Importing customization from M01 and STG files


AskInga logo

Original Article Date:March 2006 

For those of you experimenting with MicroStation V8 XM Edition, you might find this article/tutorial of interest. Authored by Bentley’s Tim Hickman it’ll get you started on importing the content from your old ustn.m01 files into MicroStation V8 XM Edition. Tim also touches on migrating data from any stg files you may have. Note that this article is based on the version 08.09.02.12.

Preparation:
Let’s get started! Create an interface folder and place a copy of your V8 ustn.m01 into it.
Create a new file in your dgnlib folder that will be used to house the imported interface components. For example: MyUserInterface.dgnlib.
Ensure that MS_DGNLIBLIST is pointing to this file dgnlib file.
Open this new file and go to Workspace > Customize.
Navigate to the Tools tab and you should notice the MicroStation is indeed reading the tools and tool boxes from the old M01 file.

Tool Boxes:
For purposes of this article, my M01 contains this little tool box:

Navigate to Application Tools > MicroStation as shown below and notice that the tool boxes have been added from the M01 to MicroStation.

communities.bentley.com/.../1018.286v1.wmv

You now need to copy them from Application Tools > MicroStation to User Tasks.
On the left side, ensure that you’ve selected the tool box you want to migrate. Do a right click and select Copy. On the right side, expand User Tasks, highlight your dgnlib file, do a right click and select Paste. It can’t get any easier than that!

communities.bentley.com/.../6675.289v2.wmv

Since tool boxes now become tasks, you can verify that it’s been added correctly by noting the changes to the Task Navigation tool bar.

communities.bentley.com/.../6131.289v4.wmv

Menu Items:
Customized menu items from your M01 file are handled a little differently. In this article, we’ll look at importing this little menu bar from the M01 file to the dgnlib.

communities.bentley.com/.../5672.289v5.wmv

Navigate to Workspace > Customize and go to the Tools tab. From there ensure that you’ve selected Menu from the picklist on the right side and expand Main Menu.
In doing so, notice the the custom menu items from the M01 are automatically being read and loaded into the Main Menu. MicroStation also displays M01 menu items with an italic font.

communities.bentley.com/.../7573.289v6.wmv

At this time you copy the menu item(s) by simply doing a right click and selecting Copy. Of course, you’ll then want to highlight the Main Menu and issue a paste.

communities.bentley.com/.../6457.289v7.wmv

Once your tool boxes and menu items have been copied (imported) into your dgnlib, you can delete the M01 file and tweak menu items as needed. Although this workflow may seem a bit redundant, it’s important to recognize that the menu items (and tool boxes) will not be available once the M01file is removed from the interface folder. Copying/importing these items into the dgnlib will make them available to your users via MS_DGNLIBLIST.

NOTE: The following is snipped from Help:

There are several capabilities available, should you need to change the default display of menus. To change the default settings, add any of the following capabilities to either your user configuration file (UCF) or your project configuration file (PCF):

_USTN_CAPABILITY < +CAPABILITY_UI_LOADFROMACTIVEFILE Used if you want to have access to the features on the Tools tab while working in a DGN file that is not specified by the configuration variables listed above. If this capability is set, you will see the custom tools, tasks, and menus from the open DGN file in addition to those in the specified DGN libraries.

_USTN_CAPABILITY < +CAPABILITY_UI_IGNOREMENUSFROMDGNLIBS Used if you want to hide all menu customizations in the DGN libraries specified by the configuration variables listed above.

USTN_CAPABILITY <+CAPABILITY_UI_IGNOREMENUSFROMRSCMODFILE Used if you want to hide all menu customizations that were loaded from a user interface modification file. This capability takes effect only if the CAPABILITY_UI_IGNOREMENUSFROMDGNLIBS function is NOT set.

Settings Manager:
If you were using the Settings Manager in V8 or MS/J and wish to incorporate this into the tools, templates and tasks then you will need to do the following:

Click on the Templates tab, go to File > Import > From Settings Manager, browse to your stg file and select it.

MicroStation will import the items and you’ll see them displayed as a list of templates as well as a list of User Tools.

communities.bentley.com/.../5822.289v8.wmv

A reminder at this point is that anything we are currently doing is being placed in the active file – so these templates, tools, and tasks that came from the STG file are in the active file and not in any kind of resource file be it M01 or STG.

To recap, you should now have the contents of the old M01 and the STG files in the open dgnlib file. If you have defined MS_DGNLIBLIST to include this design file and if the workspace is shared among your users, they will be able to use the imported tools, tasks and templates.

AskInga Article #289