#PowerShell, #PowerWiseScripting, #ProjectWise, PWPS_DAB

How To: Set GeoSpatial Location for Multiple Documents

The following is a simple way to update the Geospatial Location information for one or more ProjectWise Documents.

# Get WKT from the Parent ProjectWise folder.
$WKT = Get-PWFolderGeoSpatialLocation -FolderPath 'test\new' -Verbose
# Get a list of ProjectWise Documents to update the GeoSpatial information for.
$PWDocs = Get-PWDocumentsBySearch -FolderPath 'Test\New' -Verbose
# Update the GeoSpatial location for all documents previously returned.
Set-PWDocumentGeoSpatialLocation -InputDocuments $PWDocs -WKT $WKT -Verbose

<#
Accomplish the same task while utilizing piping.
Get a list of Documents to update the GeoSpatial information for and pipe to the
Set-PWDocumentGeoSpatialLocation cmdlet to update the GeoSpatial location for all documents returned.
#>
Get-PWDocumentsBySearch -FolderPath 'Test\New' -Verbose |
Set-PWDocumentGeoSpatialLocation -WKT $WKT -Verbose

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 )

Google photo

You are commenting using your Google 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