Title Block Update Options

Hello all,

I've often been asked, "what if someone edits the title block tag fields in MicroStation, and then checks the file back in to ProjectWise?" Well, unless they issue the key-in "titleblock updatedms" prior to exiting MicroStation, their changes will be lost. That's because, the next time the file is opened, it will synchronize from ProjectWise to the drawing, and potentially overwrite the changes that were made to the tag data in the drawing.

You can change the titleblock behavior using this VBA, and the procedure outlined below:

http://www.gc-unplugged.com/misc/AutoRun-pwtb.mvba

Procedure:

  • Download the VBA file in the link above, and add it to a folder in ProjectWise
  • From PW Admin, create a Managed Workspace in ProjectWise
  • Within the workspace, define the variable MS_VBAAUTOLOADPROJECTS, and point it to the VBA file in ProjectWise

You may now assign the managed workspace to a folder or file in ProjectWise. You could also assign the same configuration variable definition to a User, or Application.

The VBA registers a function that gets run as MicroStation exits. That function contains one line that issues the key-in> titleblock updatedms. This way the tag data edits are pushed back to ProjectWise prior to MicroStation closing down.

The VBA also registers a function that gets run as MicroStation opens. That function contains two lines, one to load the ProjectWise title block application (mdl load mcmtb), and a second line to run the "titleblock updatenow" commmand. With this command, you can disable the standard ProjectWise Title Block Update Condition "Document is Opened". This allows you to be selective as to which files/folders/users get titleblock updates, by assigning the workspace.

One last note: ProjectWise already loads the MCMTB application each time MicroStation starts up so it shouldn't be necessary to load it within the VBA. However I ran into a problem where the VBA ran before MCMTB gets loaded in the starup order. Therefore the VBA was issuing an invalid key-in because the Titleblock Updatenow key-in is defined by the MCMTB application. Adding "mdl load mcmtb" to the VBA fixes that problem.

Enjoy,

Gary