Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Is there a CMDLET to identify rich projects that have a specific WorkSet assigned?
    • Sign In

    • State Not Answered
    • Replies 9 replies
    • Subscribers 67 subscribers
    • Views 839 views
    • Users 0 members are here
    • PWPowerShell
    • ProjectWise PowerShell Modules

    Is there a CMDLET to identify rich projects that have a specific WorkSet assigned?

    K. Tonya Chappell
    Offline K. Tonya Chappell over 1 year ago

    I am looking for a cmdlet that will identify Rich Project within a datasource with specific variable for WorkSet/Project assigned.

    • Sign in to reply
    • Cancel
    Parents
    • K. Tonya Chappell
      0 Offline K. Tonya Chappell Tue, Jul 19 2022 5:26 PM

      Thank you for help Matt. I tried both cmdlets. The result for both "true", no list of projects generated. 

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Matt Kovach
      0 Offline Matt Kovach Wed, Jul 20 2022 7:13 AM in reply to K. Tonya Chappell

      Can you please post your code and results here?

      This is what I see when getting a list of Rich Project Folders with any WorkSet/Project Configuration Settings Block assigned, given my FolderPath parameter value:

      $RichProjects = Get-PWRichProjects -FolderPath "Design" | Get-PWManagedWorkspaceConfigBlocksFromFolder | Where-Object { $_.Workspace_Type -eq "PROJECT" }

      Also, what version of the pwps_dab PowerShell Module do you have installed?

      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
    • K. Tonya Chappell
      0 Offline K. Tonya Chappell Tue, Jul 26 2022 4:46 PM in reply to Matt Kovach

      Sorry for the delayed response, Out of Office. I am not able to duplicate the results from the CMDLET provided. PS Version 2.0.7.0

      I am using the following"

      $RichProjects = Get-PWManagedWorkspaces -InputFolders (Show-PWFolderBrowserDialog) | Get-PWManagedWorkspaceConfigBlocksFromFolder | Where-Object {$_.Workspace_WorkSet -eq "English"}

      I also used the following

      $RichProjects = Get-PWManagedWorkspaces -InputFolders (Show-PWFolderBrowserDialog) | Get-PWManagedWorkspaceConfigBlocksFromFolder | Where-Object {$_.Workspace_Type-eq "Managed"}

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Matt Kovach
      0 Offline Matt Kovach Tue, Jul 26 2022 5:26 PM in reply to K. Tonya Chappell

      Can you please try the following (will display Rich Project Folder Names found within the selected Folder Path, as well as the applicable WorkSpace Configuration Settings Block Types and Names):

      # Prompt for Folder Path.
      $FolderPath = Show-PWFolderBrowserDialog

      # Get Rich Projects.
      $RichProjects = Get-PWRichProjects -FolderPath $FolderPath.FullPath | Get-PWManagedWorkspaceConfigBlocksFromFolder

      Here are my results from this code:

      As you can see, Workspace_WorkSet is not a valid property (i.e. $_.Workspace_WorkSet -eq "English" won't work). Additionally, Managed is not a valid WorkSpace Type (i.e. $_.Workspace_Type -eq "Managed" won't work).

      If you are looking for Rich Projects that have WorkSpace Configuration Settings Blocks assigned to them who's name is English, then you would use this code:

      # Prompt for Folder Path.
      $FolderPath = Show-PWFolderBrowserDialog

      # Get Rich Projects.
      $RichProjects = Get-PWRichProjects -FolderPath $FolderPath.FullPath | Get-PWManagedWorkspaceConfigBlocksFromFolder | Where-Object { $_.Workspace_Name -eq "English" }

      If you are looking for Rich Projects that have WorkSpace Configuration Settings Blocks assigned to them who's type is WorkSet/Project, then you would use this code:

      # Prompt for Folder Path.
      $FolderPath = Show-PWFolderBrowserDialog

      # Get Rich Projects.
      $RichProjects = Get-PWRichProjects -FolderPath $FolderPath.FullPath | Get-PWManagedWorkspaceConfigBlocksFromFolder | Where-Object { $_.Workspace_Type -eq "PROJECT" }

      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
    • Kevin van Haaren
      0 Offline Kevin van Haaren Wed, Jul 27 2022 11:00 AM in reply to Matt Kovach

      One thing to note is that Get-PWManagedWorkspaces only returns managed workspace blocks that are directly assigned to a folder, if it inherits the block from another level it won't return it.

       

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Matt Kovach
      0 Offline Matt Kovach Wed, Jul 27 2022 11:27 AM in reply to Kevin van Haaren

      Excellent point, Kevin!

      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 Wed, Jul 27 2022 11:43 AM in reply to K. Tonya Chappell

      I must apologize for my previous responses. I clearly missed the mark on your original question, I think.

      To be clear (on my end), you are looking code that will create a list of Work Areas (the Parent Project Folder) that has one or more Managed WorkSpace Configuration Settings Blocks assigned to it (the Parent Project Folder), one of which (of the Managed WorkSpace Configuration Settings Blocks) contains a specific Workspace Variable? If you want to include any Folder, this will change the needs a bit, as Kevin pointed out.

      In any case, I THINK that this can be done using a combination of Get-PWRichProjects, Get-PWManagedWorkspaces and Get-PWManagedWorkspaceVariables cmdlets.

      Can you share your hopes of output? Do you just want a list of Rich Projects (or Folders) that meet the desired criteria or do you want more included in the output (i.e. Rich Projects by Name or Full Path, WorkSpace Configuration Settings Block Name and Variables)?

      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
    Reply
    • Matt Kovach
      0 Offline Matt Kovach Wed, Jul 27 2022 11:43 AM in reply to K. Tonya Chappell

      I must apologize for my previous responses. I clearly missed the mark on your original question, I think.

      To be clear (on my end), you are looking code that will create a list of Work Areas (the Parent Project Folder) that has one or more Managed WorkSpace Configuration Settings Blocks assigned to it (the Parent Project Folder), one of which (of the Managed WorkSpace Configuration Settings Blocks) contains a specific Workspace Variable? If you want to include any Folder, this will change the needs a bit, as Kevin pointed out.

      In any case, I THINK that this can be done using a combination of Get-PWRichProjects, Get-PWManagedWorkspaces and Get-PWManagedWorkspaceVariables cmdlets.

      Can you share your hopes of output? Do you just want a list of Rich Projects (or Folders) that meet the desired criteria or do you want more included in the output (i.e. Rich Projects by Name or Full Path, WorkSpace Configuration Settings Block Name and Variables)?

      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
    Children
    • K. Tonya Chappell
      0 Offline K. Tonya Chappell Wed, Jul 27 2022 4:33 PM in reply to Matt Kovach

      Thank you for your help in this task. I have learned a few things by trail and error. Please don't be upset about the misunderstanding. I've been enlighten. 

      To answer your follow-up question. Looking for Rich Projects only by name and WorkSpace Configuration Settings Block Name and Variables.

      • 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