Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Automation and Productivity Gains: A PowerShell Use Case - Accel ProjectWise virtual conference
    • Sign In

    • Replies 7 replies
    • Subscribers 68 subscribers
    • Views 1089 views
    • Users 0 members are here
    • powershell
    • ProjectWise
    • ProjectWise PowerShell Modules

    Automation and Productivity Gains: A PowerShell Use Case - Accel ProjectWise virtual conference

    Marty.Nickel
    Offline Marty.Nickel over 3 years ago

    Please use this thread for all questions relating to the Accel ProjectWise virtual conference's session on Automation and Productivity Gains: A PowerShell Use Case

    • Sign in to reply
    • Cancel
    • Bert Fegyverneki
      Offline Bert Fegyverneki Thu, Apr 23 2020 1:01 PM

      Is there a current, comprehensive document to explain how to install, configure and update the ProjectWise Powershell module?

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Cancel
    • Dan Williams
      Offline Dan Williams Thu, Apr 23 2020 2:07 PM in reply to Bert Fegyverneki

      Check out Zachary Kerr's video available here:  https://www.screencast.com/t/gYEXmtdmUwe 

      The files that Zachary mentions are available here: https://communities.bentley.com/products/projectwise/content_management/m/mediagallery/274328

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Cancel
    • Marty.Nickel
      Offline Marty.Nickel Thu, Apr 23 2020 2:08 PM in reply to Bert Fegyverneki

      and here is a thread:

      https://communities.bentley.com/products/projectwise/content_management/f/projectwise-powershell-extensions-forum/143840/update-we-have-changed-the-way-we-are-delivering-pwps_dab



      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Cancel
    • Bert Fegyverneki
      Offline Bert Fegyverneki Thu, Apr 23 2020 2:38 PM in reply to Bert Fegyverneki

      Thanks very much Dan and Marty!

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Cancel
    • Kevin van Haaren
      Offline Kevin van Haaren Sat, Apr 25 2020 9:35 PM

      Marty should be posting a PDF of the presentation soon, in the meantime here's some of the sample code I had in the presentation

      # Datasource with PDFs
      $datasource = "Dev Datasource"
      
      # Splat for where to locate PDFs
      $pdf_splat = @{
      	FolderPath = 'Users\KvanHaaren\PDFTest\Sheets'
      	FileName = '%.pdf'
      }
      		
      # Splat to merge PDFs
      $merge_splat = @{
      	InputDocuments = @()
      	OutputFolder = 'Users\KvanHaaren\PDFTest\Book'
      	OutputName = '715 Kirk Floor Plans.pdf'
      	VersionExisting = $true
      }
      				
      New-PWLogin $datasource
      # Get documents
      $pdfs = Get-PWDocumentsBySearch @pdf_splat
      
      # add documents to merge splat
      $merge_splat.InputDocuments = $pdfs
      
      # make book
      $book = Merge-PWPDFs @merge_splat
      
      # did it work?
      $book | Select Name,CreateDate,Version

      This is the basic script for merging PDFs. It incorporates some of my favorite methods such as using splat variables to put all the configuration data at the top where it's easy to find and modify, and the code later on. The $pdf_splat can be adjusted to include any of the Get-PWDocumentsBySearch options. Options that are typically just specified on the command line with no value (like -JustThisFolder) can be put in a splat by setting the key to $true (option turned on) or $false (option off).

      # Splat for where to locate PDFs
      $pdf_splat = @{
      	FolderPath = 'Users\KvanHaaren\PDFTest\Sheets'
      	FileName = '%.pdf'
          JustThisFolder = $false
      }
      

       

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Cancel
    >

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies