Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum CheckOut-PWDocuments To Export "Checked Out" or "Exported" Documents
    • Sign In

    • State Not Answered
    • Replies 4 replies
    • Subscribers 68 subscribers
    • Views 861 views
    • Users 0 members are here
    • powershell

    CheckOut-PWDocuments To Export "Checked Out" or "Exported" Documents

    Matt Kovach
    Offline Matt Kovach over 2 years ago

    Good afternoon PowerShell for ProjectWise Pros!

    Anyone experiencing issues with the CheckOut-PWDocuments cmdlet to Export "Checked Out" or "Exported" Documents? I am using the following code and not seeing expected results of exported Files, nor am I seeing errors:

    # Unmanaged Export Documents within the specified Folder Path.
    CheckOut-PWDocuments -InputDocument $Document -CopyOut -ExportFolder $OutputSubfolderPath -NoReferences

    Looking to just Export a copy of Files to a specified Windows Folder, similar to the native Export - Send to Folder function, but without References. If the Document is "Checked In", then the same code works without issue (i.e. Files are Exported to the specified Folder).

    Installed version of PWPS_DAB: 1.23.12.0

    Thanks in advance your assistance!

    • Sign in to reply
    • Cancel
    • Kevin van Haaren
      0 Offline Kevin van Haaren Wed, Jan 27 2021 8:51 AM

      I tried your code and it kind of worked for me, I did get exports of both checked-in files and checked-out files, BUT in Projectwise files all the checked in files were now locked as exported (so duplicating the Export - Locks File function).

      I tried updating by adding the -Export option which is supposed to prevent that lock, but that threw an error that there were conflicting parameters.

      I also tried:

      Export-PWDocuments

      If you specify a -ProjectWiseFolder option it mostly does what you want (but I suspect in brings references along, ugh). If you use an array of ProjectWise documents like you did in your example, it uses the ProjectWise path (added to the -OutputFolder specified) so you end up with a big tree of files.

      Also I don't think Export-PWDocuments has a NoReferences option.

      I'm testing with PWPS_DAB 1.24.4.0. Might explain the differences in the first test.

       

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Matt Kovach
      0 Offline Matt Kovach Wed, Jan 27 2021 10:43 AM in reply to Kevin van Haaren

      Thanks for looking into this, Kevin.

      If I run my script to Export a File that is Checked Out or Exported, then I get nothing exported (no errors either). But, if I run the same script and Export the same File (but Checked In), the File is Exported (Send To Folder way of it) and the ProjectWise Document is not locked nor has a Status of "Exported". Weird...unless I am missing something (which is entirely possible).

      I will try updating my PWPS_DAB module to the latest version, and try running the script again.

      Also, I tried using Export-PWDocuments cmdlet. But as you said, it mirrors the Full ProjectWise Path (I just need the Path from the Project or Work Area, down). So, this won't work for us.

      ProjectWise Explorer CONNECT Edition, Version 10.00.03.453

      ProjectWise Drive, Version 2022.1.328

      OpenRoads Designer CONNECT Edition, Version 10.09.00.91

      OpenRoads Designer CE 202 Release 2, Version 10.10.21.4

      Power GEOPAK V8i (SELECTseries 10), Version 08.11.09.918

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Matt Kovach
      0 Offline Matt Kovach Thu, Jan 28 2021 10:29 AM in reply to Kevin van Haaren

      Follow-up reply:

      I've downloaded the latest version of the PWPS_DAB module and am seeing the same results. Can we request a review of the CheckOut-PWDocuments cmdlet to add the capability to emulate the ProjectWise Explorer Export - Send to Folder function? Not sure if this the proper cmdlet to incorporate the change or if the Export-PWDocuments cmdlet makes more sense. If the latter, the -NoReferences parameter will need to be added, as well as the option to explicitly specify an Export Folder Path, as opposed to what the -OutputFolder parameter does (i.e. mirror the entire ProjectWise File Path).

      ProjectWise Explorer CONNECT Edition, Version 10.00.03.453

      ProjectWise Drive, Version 2022.1.328

      OpenRoads Designer CONNECT Edition, Version 10.09.00.91

      OpenRoads Designer CE 202 Release 2, Version 10.10.21.4

      Power GEOPAK V8i (SELECTseries 10), Version 08.11.09.918

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • hansh
      0 Offline hansh Wed, Mar 16 2022 9:58 AM in reply to Matt Kovach

      I should also be helped with a function/cmdlet similar to "Export - Send to Folder".
      And my answer on the question that Export-PWDocuments givs,
      "Not permitted for users not logged in as a ProjectWise Administrator or Restricted Administrator and not a member of 'PowerShell Users' group. Let us know if you think this cmdlet should be enabled for read-only users."
      is that this cmdlet should work with the same privilege as I have in PW explorer.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • 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