How a Managed Workspace Ends up in MicroStation

Managed Workspaces is a new methodology for managing MicroStation workspaces in ProjectWise.   Users can create and maintain their complete workspace configuration, workspace resources and standards in ProjectWise.

I've been certifying Managed Workspaces for a few years now and would like to share some technical information I have accumulated.  The first topic I would like to cover is how the Managed workspace is exported from ProjectWise and used to launch MicroStation.

The best way to understand the how the Managed Workspace is processed is to take a look at the Managed Workspace Export Progress dialog.  When you open a design file from ProjectWise with a Managed Workspace the first thing you'll see is the Managed Workspace Export Progress dialog.   In the Task section you will see the workflow used to launch MicroStation.

 

 

 

First Task "Gathering configuration settings blocks":    ProjectWise gathers the configuration settings blocks (CSB's) assigned to the design file being opened.

 

Second Task "Creating temporary configuration files":  This task needs to be broken into three parts. 

  • 1) ProjectWise creates a configuration file in the users working directory for each CSB assigned to the design file. Each CSB is numbered with the database ID used when the CSB was created. In each configuration file will be a description written from the name of the CSB used to generate the configuration file. Each configuration file will contain the variable PW_MANAGEDWORKSPACEENABLED>#, this variable tells MicroStation it is running with a Managed Workspace. Remember, these configuration files are generated each time a design file is opened with a Managed Workspace, any manual edits will be lost.
  • 2) ProjectWise creates its own temporary mslocal.cfg file, for example, Mwc1mslocal.cfg. This file is created from the contents of the mslocal.cfg file which MicroStation uses. ProjectWise will evaluate the mslocal.cfg file and transfer the System, Application and Site level configurations to the new Mwc1mslocal.cfg file. The User and Project sections will be undefined.
  • 3) ProjectWise will then determine the order in which the temporary configuration files are to be processed. This order is gathered from the workspace levels and priority they are assigned to the design file being opened. The configuration order is written to the Mwc1.tmp file. This configuration order will be used to create the final configuration file. ProjectWise will also create variables _DGNDIR and _DGNFILE in the Mwc1.tmp file. These variables specify the current location and filename of the design file being opened. _DGNDIR and _DGNFILE can be used to resolve ProjectWise Projects. I will cover this in a later post.

ProjectWise V8i (SELECTseries1)

With ProjectWise V8i (SELECTseries1) we made modifications for how workspaces are processed.   Steps 2 and 3 were improved to load the CSB's at the same level we gather the MicroStation configuration. In ProjectWise V8i (SELECTseries1), Steps 2 and 3 are as follows:

  • 2) ProjectWise creates its own temporary mslocal.cfg file, for example, Mwc1mslocal.cfg. This file is created from the contents of the mslocal.cfg file which MicroStation uses and the CSB's assigned to the design file being opened. ProjectWise will evaluate the mslocal.cfg file and transfer the System, Application and Site level configurations to the new Mwc1mslocal.cfg file. The User and Project sections will be undefined. ProjectWise will also add a %include directive for each of the generated config files at the appropriate level. All the CSB's assigned to the design file being opened will be %included in this configuration file.
  • 3) ProjectWise will create the Mwc1.tmp file which will %include the configuration file Mwc1mslocal.cfg. ProjectWise will also create variables _DGNDIR and _DGNFILE in the Mwc1.tmp file. These variables specify the current location and filename of the design file being opened. The Mwc1.tmp configuration file will be used to generate the final configuration file.

 

Third Task "Gathering data for configuration files":  ProjectWise starts evaluating the configuration files and determines what data needs to be copied out. ProjectWise starts locating all the data in ProjectWise that needs to be downloaded.

 

Fourth Task "Resolving relative paths":  ProjectWise compiles all relative paths in the configuration files and converts them to actual identifiers for the workspace data which will be copied out.

 

Fifth Task "Checking Status and Downloading workspace documents":  ProjectWise downloads the workspace resources specified as ProjectWise Documents. When you create a CSB there is a Value Type for "ProjectWise Document". This first download pass will download all workspace data which was specified as a ProjectWise Document.

 

Sixth Task "Checking Status and Downloading workspace folders and data":  ProjectWise downloads the workspace resources specified as ProjectWise Folders. When you create a CSB there is a Value Type for "ProjectWise Folders". This download pass will download all workspace data from the variables which point to a ProjectWise Folder.

 

Seventh Task "Creating final workspace configuration file":  ProjectWise will then process the Mwc1.tmp configuration file. At this time all the configuration files are processed for their final values and written to the final configuration file. The final configuration file is similar to a MSdebug.cfg file. The configuration file is created using the document identifier from ProjectWise. Using the Document identifier avoids any conflicts with filenames. The final configuration file is appended to the command line with the -wc switch and passed to MicroStation on startup.

 

MicroStation will now be up and running in a Managed Workspace environment. The next time you open a design file with the Managed Workspace you should not see the Managed Workspace Export Dialog, or if it appears you will only see it for a brief second. Since all the workspace data MicroStation needs has already been downloaded to the working directory, MicroStation will start up immediately. During the fifth and sixth tasks ProjectWise will check to see if the copied out workspace data is up to date. If the Workspace data was modified, ProjectWise will have to download the updated data to the working directory. In this instance you may see the Managed Workspace Export Progress dialog for a short period of time.

 

More posts to follow! If you have any specific topics or ideas you want me to expand upon please send me and email or post here.

CSB = Configuration Settings Block

 

 

Anonymous