Find/Replace Paths in MicroStation Print Organizer Print Sets


  
 Applies To 
  
 Product(s):MicroStation
 Version(s):08.11.09.459
 Environment: N\A
 Area: Printing
 Subarea: Print Organizer
 Original Author:Dawn Gentry, Bentley Technical Support Group
  

 

Find/Replace Paths in MicroStation Print Organizer Print Sets

 

When working with print sets (.PSET) in Print Organizer, the full path to the design file, pen tables, and design scripts are used.  Sometimes the files that make up a print set are renamed or moved to another folder. This can cause problems when printing the same PSET at a later date.

 

There are two ways to modify the saved PSET to use the correct paths.  The first way is to manually replace the file paths using the Find and Replace Paths… command in Print Organizer under the Edit menu.

 

For example, suppose the files that make up a print set reside in "c:\projectA" and you move them to "c:\dgn\projectA". Use the Find and Replace File Paths… dialog to replace the path name of the DGN file and/or the pen table/design script. This command acts on the entire file specification including both the folder and file name.

 

You can also use an empty replacement string to remove the entire file path, therefore, leaving just the basename for the DGN and pen table/design script filenames. Removing the entire file path from the DGN and pen table filenames allows you to create portable print set files.

  

While the Find and Replace Paths… dialog is a good solution when modifying an individual PSET, it can be tedious and time consuming when multiple PSETs need modification.  There is a second method for this case, the RebasePset utility.

 

The RebasePset utility is a command-line tool therefore it is more convenient if you have to modify a group of .pset files. The tool performs a find/replace with the given strings for every file specification in a .pset file, for every .pset file recursively in a directory.

 

Usage: RebasePset <directory> <findString> <replaceString>

 

The tool also works on PW-aware PSETs.  In a PW-aware .pset file, the documents are specified two ways: (a) the universal file specification (UFS) which is the document URL and (b) the moniker string.  The moniker string is a PW-internal representation of the document, and contains more than just the URL.  Having the moniker allows us to look up documents by GUID.

 

When working in ProjectWise mode, you will need to copy the .pset files out first.

 

For example, if Test1.pset was created referencing files in the hsvplot:pwip7 data source but the files were then moved to the jackson:PWSS3 data source, ProjectWise will prompt you to log in to the non-existent data source before you can open the .pset.   In this case, RebasePset is your only option.

First, copy out Test1.pset from ProjectWise.  From the DOS command prompt, key in the following:

RebasePset C:\hsvplotpwadminlocal\d0141269 pw:\\hsvplot.bentley.com:pwip7 pw:\\jackson.bentley.com:PWSS3

RebasePset will be updated to contain the new ProjectWise data source.  Note: Updating the ProjectWise moniker to a new data source may possibly reference the files by a new GUID. When opening the saved .pset for the first time in the new data source, you may be prompted with a dialog to find the new ProjectWise IDs.
If the folder contains a space, in order to change the moniker of a file in the .pset, you need to add a second \ at the end of your RebasePset command line. 
Example:
Rebasepset C:\hsvplotpwadminlocal\d0141269 "pw:\\hsvplot.bentley.com:pwip7\Documents\Airport Precincts\Architectural\\" "pw:\\hsvplot.bentley.com:pwip7\Documents\Airport Precincts\Mechanical\\"
Contact the Plotting Technical Support Group regarding any questions or problems using these find/replace methods.

communities.bentley.com/.../8105.RebasePset.zip