Dynamic Projects with Managed Workspaces

Dynamic Projects is a great way to manage all your MicroStation Projects using Managed Workspaces.   In pre V8 XM versions Administrators had to create a Project CSB for each Project in the datasource.  Having many CSB's can be difficult to manage.   ProjectWise V8 XM Edition introduced the concept of Dynamic Projects.  Two new macros were added, DMS_PROJECT and DMS_PARENTPROJECT, which can be used to define paths for MicroStation Projects data.   ProjectWise will evaluate the folder structure and return the path of the nearest Project found.   When the macro is used along with MicroStation variables you can discover the project from which the current design file is being opened.   Dynamic projects will eliminate the need to create a CSB for each Project.  Using the delivered MicroStation workspace I will demonstrate how this works.  I will create a single Project CSB which will be used to manage each of the MicroStation projects.

The new macros are,

DMS_PROJECT:   ProjectWise defined macro which will resolve to the nearest Project in the hierarchy,   similar to devdir in MicroStation.

DMS_PARENTPROJECT:  ProjectWise defined macro which will resolve to the second nearest project in the hierarchy, similar to parentdevdir in MicroStation.

A) Import the delivered MicroStation workspace data into ProjectWise.

  • 1) Run the Managed Workspace Import Wizard and choose the option "Import Data to ProjectWise, from the file system". This will open the "Import and Validate ProjectWise Folder Structure and Documents" page.
  • 2) Under the Local File system browse to the MicroStation Workspace root folder, e.g. C:\ProgramData\Bentley\MicroStation V8i (SELECTseries 1)\Workspace\
  • 3) Under the ProjectWise section, right click in the window and choose New folder. For this example I will replicate the MicroStation workspace structure. Create a folder called "MicroStation V8i (SELECTseries 1)". Under this folder create a folder called "Workspace".
  • 4) Highlight the local Workspace folder on the left under Local File System. On the right, under ProjectWise, highlight the Workspace folder you created. Click the [Map] button to create the mapping. Highlight the mapping in the bottom window and click [Copy] to import the workspace data. Import all the subfolders.

 

B) Import one of the delivered project configuration files into a CSB. I'm going to use one of the existing project configuration files as a template.

  • 1) Run the Managed Workspace Import Wizard and choose the option "Import MicroStation Configuration File to ProjectWise Configuration Settings Blocks". Continue through the wizard to the "Workspace Configuration Files" page.
  • 2) Choose the [Add] button, browse to the local ...\Projects\Examples\ folder and select the Building.pcf file to import. Finish stepping though the wizard to complete the import

 

C) Edit the Imported Project CSB. (see image)

  • 1) In ProjectWise Administrator open the properties on the imported Building Project CSB.
  • 2) On the General Tab change the Name and Description to "MicroStation Projects"
  • 3) Switch to the Configuration tab. The delivered MicroStation projects use the path defined by _USTN_PROJECTDATA to locate all the Workspace Project data. I'm going to add the variable _USTN_PROJECTDATA and have it resolve to the nearest ProjectWise Project.
  • 4) Click the green plus symbol (+) to add a variable. Create the variable _USTN_PROJECTDATA and assign a string value type with the value of $(dms_project (_DGNDIR)), e.g. _USTN_PROJECTDATA = $(dms_project (_DGNDIR))   This will set the _USTN_PROJECTDATA variable equal to the project of the design file being opened.
  • 5) I will also set the variable _USTN_PROJECTNAME to dynamically update with the Name of the Project folder. Add variable _USTN_PROJECTNAME = $(LastDirPiece (dms_project (_DGNDIR))).
  • 6) One more, set variable _USTN_DISPLAYALLCFGVARS = 1. This variable displays all the variables used in MicroStation. This variable should be set to verify the results below.

 

 

D) Create Projects and assign the Project CSB.

  • 1) In ProjectWise Explorer upgrade the imported MicroStation project folders to ProjectWise projects, ...\MicroStation V8i (SELECTseries 1)\Workspace\Projects\Examples\. Upgrade folders Building, Civil, General, Geospatial and Plant to Projects. Right click on the folder and choose, Upgrade to Project.
  • 2) Open the properties on the Projects folder, ...\MicroStation V8i (SELECTseries 1)\Workspace\Projects\ Switch to the Workspace tab and add an association for the CSB we created "MicroStation Projects".

 

When you open a design file under any of the project folders ProjectWise will scan the tree for the nearest Project folder in the tree and substitute the ProjectWise path for the Project in the variable _USTN_PROJECTDATA.   All the workspace date using the relative path _USTN_PROJECTDATA will be copied to the local working directory.

 

Open a design file from the Building project, ...\Building\dgn\Designs\*.dgn.  ProjectWise will create the configuration files, copy out the workspace data and launch MicroStation with the Building Project.  Open the Workspace configuration dialog, (Workspace > Configuration), and check the Project variables.  _USTN_PROJECTNAME will be equal to "Building".  _USTN_PROJECTDATA will be resolved to the full path of the Building Project,   pw://server:datasource/Documents/MicroStation V8i (SELECTseries 1)/Workspace/Projects/Examples/Building/.

 

Open a design file from the Geospatial project,  ...\Geospatial\dgn\Designs\*.dgn.  ProjectWise will create the configuration files, copy out the workspace data and launch MicroStation with the Project data from the Geospatial Project.  Open the Workspace configuration dialog and check the project variables. _USTN_PROJECTNAME will be equal to "Geospatial".  _USTN_PROJECTDATA will be resolved to the full path of the Geospatial Project,   pw://server:datasource/Documents/MicroStation V8i (SELECTseries 1)/Workspace/Projects/Examples/Geospatial/.

 

Same results will apply to the Civil, General and Plant projects.  A single CSB can be used for each of the MicroStation Projects. 

 

CSB = Configuration Settings Block

 

Anonymous