Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum get-pwreferencefiles limitation?
    • Sign In

    • State Suggested Answer
    • Replies 3 replies
    • Answers 1 answer
    • Subscribers 66 subscribers
    • Views 1626 views
    • Users 0 members are here

    get-pwreferencefiles limitation?

    Paul Patterson
    Offline Paul Patterson over 5 years ago

    Howdy,

    I'm finding that when trying to get a list of references of a file with a healthy amount of references, the command just sits there.. indefinitely.

    This is also true even if setting the depth to 0, or 1. 

    A) is anyone else experiencing this?

    B) can we have some sort of verbose switch? 

    Paul

    • Sign in to reply
    • Cancel
    • Arturas Zidonis
      0 Offline Arturas Zidonis Thu, Nov 2 2017 2:37 PM

      Paul,

      What cmdlet you've tried?

      This is working for me. e.g. Get-PWDocumentsBySearch -FolderPath "testFolder" -GetAttributes | Where-Object {$_.FileName -eq "test.dgn"} | Get-PWReferenceFiles -referencelevel 0 | Select FileName,FullPath

      BR,
      Arturas

         
      This is a test

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • mblumenf
      0 Offline mblumenf Wed, Mar 21 2018 2:41 PM in reply to Arturas Zidonis

      Arturus,

      When I run the above command on a group of files and change the -referenceleve to 1, I get a list of references with a nest depth of 1, but there doesn't seem to be a way to tell what the master file is. For example, if I have SheetOne.dgn and SheetTwo.dgn, each with nested references, When I run the above command I get a list of the files on level 1 but no way to tell which sheet is referencign the files. Am I missing something obvious here, or is there a better way to generate the list?

      Matt

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Arturas Zidonis
      0 Offline Arturas Zidonis Thu, Mar 22 2018 8:39 AM in reply to mblumenf

      Matt,

      In that case if you want to see SheetOne.dgn and then all its references, then SheetTwo.dgn and its references you could use something like this:

      $masters = Get-PWDocumentsBySearch -FolderPath "NR\Master" -GetAttributes | Where-Object {$_.FileName -ilike "*.dgn"}

      Foreach ($master in $masters){

      Write-Host "Master file: $($master.FileName)" -ForegroundColor Green

      (Get-PWReferenceFiles -InputDocument $master).Filename

      }

         
      This is a test

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