Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum I have a list of PW GUID's I want to create a set or add to a set with all the docs in my list. Looks like the Add-PWDocumentFlatSetMember on accepts Doc name and folder path
    • Sign In

    • State Not Answered
    • Replies 2 replies
    • Subscribers 65 subscribers
    • Views 151 views
    • Users 0 members are here
    • powershell
    • powershellscripting
    • pwps_dab
    • Add-PWDocumentFlatSetMember

    I have a list of PW GUID's I want to create a set or add to a set with all the docs in my list. Looks like the Add-PWDocumentFlatSetMember on accepts Doc name and folder path

    DaveSime
    Offline DaveSime 6 months ago

    I have a list of PW GUID's I want to create a set or add to a set with all the docs in my list.  Looks like the Add-PWDocumentFlatSetMember on accepts Doc name and folder path.  Is there a way to add to a set just using the GID in one script?  If not is there a way to have Powershell extract the doc names and paths and then fill in the Add-PWDocumentFlatsetmeber command with those parameters one at a time.

    • Sign in to reply
    • Cancel

    Top Replies

    • MWBSI
      MWBSI Mon, Apr 3 2023 12:46 PM +1
      You could use Get-PWDocumentsByGuilds and pipe the result to Add-PWDocumentFlatSetMember. For example $docs = Get-PWDocumentsByGUIDs -DocumentGUIDs 'd0bc426a-973e-4ebe-8764-7739e81e9182', '31050aa0-bf0c…
    Parents
    • MWBSI
      0 MWBSI Mon, Apr 3 2023 12:46 PM

      You could use Get-PWDocumentsByGuilds and pipe the result to Add-PWDocumentFlatSetMember.  For example

      $docs = Get-PWDocumentsByGUIDs -DocumentGUIDs 'd0bc426a-973e-4ebe-8764-7739e81e9182', '31050aa0-bf0c-4804-a9f4-236c54496f33'

      $docs | Add-PWDocumentFlatSetMember  -FolderPath 'Projects' -SetName 'DGNs' -LockToVersion -Verbose

      Use help -detailed on each cmdlet if you need further information.

      Hope this helps,

      Mark Weisman | Bentley Systems

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • MWBSI
      0 MWBSI Mon, Apr 3 2023 12:46 PM

      You could use Get-PWDocumentsByGuilds and pipe the result to Add-PWDocumentFlatSetMember.  For example

      $docs = Get-PWDocumentsByGUIDs -DocumentGUIDs 'd0bc426a-973e-4ebe-8764-7739e81e9182', '31050aa0-bf0c-4804-a9f4-236c54496f33'

      $docs | Add-PWDocumentFlatSetMember  -FolderPath 'Projects' -SetName 'DGNs' -LockToVersion -Verbose

      Use help -detailed on each cmdlet if you need further information.

      Hope this helps,

      Mark Weisman | Bentley Systems

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Children
    No Data

    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