Be sure to check out my Scripting4Crypto initiative. It’s a fun way to get into using cryptocurrencies all while getting your PowerShell needs met.
In the past, it was a process to get the Work Area for a specific folder or document. In version 24.0.2 there were two new cmdlets added which made this process easy. Each of two cmdlets, Get-PWRichProjectForFolder and Get-PWRichProjectForDocument returns a ProjectWise folder object for the Work Area of the provided folder or document. The folder object includes the project properties.
All of the ProjectWise related cmdlets are available using the PWPS_DAB module. At the time of this post, I am using version 24.0.2. Take a look at the help for each of the cmdlets to become familiar with their functionality, available parameters, etc.
- Show-PWFolderBrowserDialog
- Get-PWRichProjectForFolder
- Get-PWRichProjectForDocument
Get-PWRichProjectForFolder
The following demonstrates how to use the Get-PWRichProjectForFolder cmdlet.
# Get ProjectWise folder to get the Work Area for.
$pwFolder = Show-PWFolderBrowserDialog -Verbose
# Get the Work Area for the provided ProjectWise folder.
$pwWorkArea = Get-PWRichProjectForFolder -InputFolder $pwFolder -Verbose
Get-PWRichProjectForDocument
The following demonstrates how to use the Get-PWRichProjectForDocument cmdlet.
# Get ProjectWise document to get the Work Area for.
$pwDocument = Show-PWDocumentSelectionDialog -Verbose
# Get the Work Area for the provided ProjectWise document.
$pwWorkArea = Get-PWRichProjectForDocument -InputDocument $pwDocument -Verbose
Experiment with it and have fun.
Hopefully, you find this useful. Please let me know if you have any questions or comments. If you like this post, please click the Like button at the bottom of the page. And thank you for checking out my blog.
