Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum looking for "Get-PWDocumentAttribute" functionality
    • Sign In

    • State Verified Answer
    • Replies 3 replies
    • Subscribers 66 subscribers
    • Views 2238 views
    • Users 0 members are here
    • document
    • attribute

    looking for "Get-PWDocumentAttribute" functionality

    Robert Biggar
    Offline Robert Biggar over 5 years ago

    Is there a way to extract a document's attributes?

    I am using "Update-PWDocumentAttribute" and that works great, however, I would like to do the reverse...given a document (object) that I read into a variable, I would like to access the values of the stored attributes for that file.

    I can't find a function that would be something like  "Get-PWDocumentAttribute" ...so I suspect there is another way to access the attributes via the document object.

    little help!

    Thanks!!!

    Bob

    • Sign in to reply
    • Cancel

    Top Replies

    • Dave Brumbaugh
      Offline Dave Brumbaugh Thu, Mar 1 2018 5:09 PM in reply to Kevin van Haaren +1
      If you know the attributes you want, the faster approach is to use: $dt=Get-PWDocumentsBySearchWithReturnColumns -FolderPath "Test 6\Projects 2" -Filename '%.pdf' -States "Draft","Pending Approval" …
    • Robert Biggar
      Offline Robert Biggar Mon, Mar 5 2018 3:15 PM +1 verified
      Yeah both of those solutions work well. I do know which attributes I need this time so I can use that approach. I'm keeping the other in my notes for future reference though. very nice., I was not thinking…
    • Robert Biggar
      +1 Offline Robert Biggar Mon, Mar 5 2018 3:15 PM

      Yeah both of those solutions work well. I do know which attributes I need this time so I can use that approach. I'm keeping the other in my notes for future reference though. very nice., I was not thinking in terms of the Search, so Thank you both for the direction on this.!!!

      Answer Verified By: Robert Biggar 

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Reject Answer
      • Cancel
    • Dave Brumbaugh
      0 Offline Dave Brumbaugh Thu, Mar 1 2018 5:09 PM in reply to Kevin van Haaren

      If you know the attributes you want, the faster approach is to use:

      $dt=Get-PWDocumentsBySearchWithReturnColumns -FolderPath "Test 6\Projects 2" -Filename '%.pdf' -States "Draft","Pending Approval" -ColumnsToReturn "PercentComplete","DrawingNumber" -ReturnDataTable

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Kevin van Haaren
      0 Offline Kevin van Haaren Wed, Feb 28 2018 4:02 PM

      Use Get-PWDocumentsBySearch with the -Slow command and the CustomAttributes property will get the attribute values:

      (Get-PWDocumentsBySearch -FolderPath "\Users\KvanHaaren" -FileName "BSI400-W01-Survey-Automatio.dgn"-slow).CustomAttributes

       

      • 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