#ProjectWise, #PowerShell, #PowerWiseScripting, PWPS_DAB

HowTo: Navigate to a Folder / Document within ProjectWise Explorer

Occasionally, while working within PowerShell you will need to access a folder or document within the ProjectWise Explorer client. This can easily be done using the folder or document URN. In this post, I will demonstrate how to navigate to a ProjectWise (PW) folder or document within ProjectWise Explorer (PWE) from PowerShell using a URN. 

All of the ProjectWise related cmdlets are available using the PWPS_DAB module. At the time of this post, I am using version 2.1.2.0. Take a look at the help for each of the cmdlets to become familiar with their functionality, available parameters, etc.

  • Show-PWFolderBrowserDialog
  • Show-PWDocumentSelectionDialog
  • Start-Process

Get Folder / Document Objects

The following offers one method of obtaining a folder or document object. I will be using the browser dialogs to interactively select a folder and document.

# Select ProjectWise folder object
$pwFolder = Show-PWFolderBrowserDialog
# Select ProjectWise document object
$pwDocument = Show-PWDocumentSelectionDialog

The following shows the selection of a PW folder.

select_folder

The following shows the selection of the PW document.

select_document

The following two images show the folder and document object URN values.

show_folderURNshow_documentURN

Navigate to Objects

Now that we have our PW folder and document objects, we can navigate to them within PWE from our PowerShell session using the Start-Process cmdlet.

# Navigate to the PW folder within PWE.
Start-Process -FilePath $pwFolder.ProjectURN

# Navigate to the PW document within PWE.
Start-Process -FilePath $pwDocument.DocumentURN

The following shows the folder navigated to within PWE.

navigate_folder

The following shows the document navigated to within PWE.

navigate_document

Summary

Although this is a very simple process, it can be quite useful.


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.

2 thoughts on “HowTo: Navigate to a Folder / Document within ProjectWise Explorer”

  1. Brian, you should point out that they can use the .Locate() method on both Document and Folder objects to achieve the same thing. I believe that also will populate the URN if it is blank for some reason. Have also recently added a couple of flavors of web links as default properties on those objects. Dave.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.