You are currently reviewing an older revision of this page.
This document explains how the tasks and tool boxes in Promis.e Standalone and Bentley Substation can be customized.
To demonstrate the techniques, this document describes how to create custom buttons on the Grid Snap Setting tool box. These techniques can be extended to create other tools and customize other tool boxes and tasks, see the Other Customizations section below.
The promis.e/Substation tools and tasks are stored in a .DGNLIB file. Depending on the versions of the software involved, the file name would be:
PowerPromise.dgnlib for promis.e V8i Standalone (08.11.10.xx - 08.11.13.xx)
promisev8iSR1.dgnlib for promis.e V8i on MicroStation/PowerDraft V8i SELECTseries 1 or higher
promisev8i.dgnlib for promis.e V8i on MicroStation/PowerDraft V8i base release
promisev8XM.dgnlib if using the V8 XM version of MicroStation or PowerDraft
The tools and tasks in this .DGNLIB file could be modified. However, it is better to create a new, custom file that will supersede the original. Benefits of this technique include:
Preservation of the original .DGNLIB supplied with the software, preventing unintentional changes from affecting the source
Customizations are easy to backup or distribute by copying the custom.dgnlib file
Customizations are easily removed by removing the custom.dgnlib file.
Start Promis.e or Bentley Substation as the case may be.
Select Workspace > Configuration and find the MS_DGNLIBLIST variable.
In the MS_DGNLIBLIST variable, make note of the path that contains "\promise\" or "\Substation\" and " *.dgnlib". The * wildcard character means the software will find any .DGNLIB file in this path. If there is more than one path like this, use the one containing "Workspace". If a different path than any listed is to be used for the custom.dgnlib file, it should be added to the MS_DGNLIBLIST variable.
Close the Configuration dialog.
Select File > New from the pull down menus.
Click the down arrow on the selection box next to "Save in" and browse to the path noted in step 3. It may be necessary to create the folders listed in the path noted in step 3 but missing from the actual file system.
Leave the "Save as type" setting to "MicroStation DGN Files (*.dgn)"
Enter custom.dgnlib for "File name"
Click the Save button.
The newly created custom.dgnlib file should now be open and listed in the title bar.
Note: The custom.dgnlib file may have been opened as read-only. If the title bar of the software includes "Read-Only" along with the name of the custom .dgnlib file, use File > Open to open the file again. Be sure the "Open as Read-Only" check box is disabled on the Open dialog whenever opening the .DGNLIB file for modification.
Continuing with the example of the custom grid snap setting tool, this tool will be created in the Grid Snap Setting toolbox. Depending on the type of tool being created, a different tool box may be more appropriate. Custom tool boxes can also be created.
Select Workspace > Customize or key-in customize dialog. This will open the Customize dialog.
On the left, select the Tools tab and expand User Tools and Application Tools.
Expand the entry in the tree for the .DGNLIB file delivered with the software (this may be PowerPromise.dgnlib, PowerSubstation.dgnlib, promiseV8i.dgnlib, etc.). Depending on the version, this file may be found under Application Tools or User Tools. The various tool boxes will be listed in the tree.
While holding the CTRL key, drag the Display Options tool box to from the supplied .DGNLIB file to custom.dgnlib with the mouse and release. This copies the Display Options tool box to the custom.dgnlib file. The Display Options tool box in the custom.dgnlib file will now be used in the software instead of the one in the supplied .DGNLIB file.
Note: Clipboard management utilities can interfere with dragging or copying of items in the Customize dialog.
Collapse the supplied .DGNLIB in the tree (this may be PowerPromise.dgnlib, PowerSubstation.dgnlib, promiseV8i.dgnlib, etc.)
Right click the Grid Snap Setting tool container under custom.dgnlib > Display Options and select "New Tool". If "New Tool" is grayed out, the .DGNLIB file was probably opened as read-only.
The cursor will be positioned to rename the new tool. Rename it to ".0625" and press Enter. The text entered here will be what appears on the tool box button.
In the Command Data area below, set the information as follows:
Key-in: active gridunit 0.0625Balloon Text: Grid 0.0625Associate Template: Use Current SettingTemplate Path: None
The Key-in field is the critical field. Change the value as desired to get different grid spacing. The Balloon Text is the tool tip that will appear when the mouse cursor hovers over the button.
Custom grid spacing buttons work well with the "Label Only" presentation type. This will display the name of the tool on the button on the Grid Snap Setting tool box instead of an icon or an icon plus the label. Other types of tools may lend themselves more to graphical icons. To base new icons on existing icons for promis.e/Substation tools, the icons can be exported, modified, and then imported. In the General Settings area, set the information as follows:
Icon: leave this as the default or browse to another.Tool Presentation: Label OnlyTool Type: StandardDimension: Both
Drag or use the up and down arrow icons to adjust where the new tool appears in the list.
Close the Customize dialog.
Select File > Save to save the custom.dgnlib file.
Following the procedure up to this step will make a new grid spacing button appear in the Grid Snap Setting tool box but not in Tasks > Design > Display Options. Select Tools > Tool Boxes > Grid Snap Setting - Custom or Display Options - Custom to turn this tool box on and test the new tool.
Repeat this procedure for any additional custom grid spacing buttons desired.
"Separators" are optional lines that can be added to distinguish groups of tools or help differentiate two adjacent "Label Only" tools. To add a separator, right click a tool box and select "New Tool Separator". Use the arrow buttons to position the separator.
Since the original Display Options tool box still resides in the supplied .DGNLIB file, it is safe to delete unused grid snap settings from the Display Options > Grid Settings tool box in the custom.dgnlib file
Note: If the grid snap settings are never accessed via a tool box and are always accessed from a task such as the Design task, then only tools for the custom spacings would have to be created in the custom.dgnlib. The Display Options tool box would not have to be copied from the supplied .DGNLIB file as described in step 4.
Now that the custom tool has been created, it must be added to the tasks where it will be used. Otherwise it will only appear in the tool box.
In the Customize dialog (Workspace > Customize), expand the User Tasks and Application Tasks items in the tree in the Tasks area on the right.
Expand the promis.e or Substation .DGNLIB file in the tree (this may be PowerPromise.dgnlib, PowerSubstation.dgnlib, promiseV8i.dgnlib, etc.)
While holding the CTRL key, drag the Design task to the custom.dgnlib item with the mouse and release or right click, Copy and Paste. This copies the Design task to the custom.dgnlib file. The Design task in the custom.dgnlib file will now be used in the software instead of the one in the supplied .DGNLIB file. Note: in older versions of the software there will be a Schematic Design task instead of Design; copy Schematic Design in that case.
In the left pane, expand User Tools > custom.dgnlib > Display Options > Grid Snap Settings to reveal the new custom tool(s) created in the previous section.
In the right pane, expand User Tasks > custom.dgnlib > Design > Display Options > Grid Snap Setting
Drag the new grid spacing tool(s) from the left pane into the Grid Snap Setting task on the right pane. Alternatively, right click the new tool in the left pane, select Copy, then right click the Grid Snap Setting task in the right pane and select Paste.
The new tool can be positioned relative to the existing tools by dragging or using the up and down icons. Unused tools can be deleted by right-clicking them and selecting Delete.
Repeat this procedure and copy the new tool(s) into the remaining tasks such as the Pneumatic/Hydraulic task as desired.
Notes regarding the grid button example:
The tool box does not indicate the active grid spacing.
When appearing as a "flyout" button, the first tool in the container is displayed whenever a page is opened, regardless of the actual active grid spacing.
The grid spacing that is initially active when a page is opened or created is determined by Project Options > Default Grid & Snap Settings, not the spacing that was active when the page was last saved or by the grid settings in the seed file.
Important: Restart the software after creating or modifying the .DGNLIB file. Otherwise new customizations may not appear or operate as expected.
The techniques described in this document can be extended to create other customizations as well.
A custom toolbox or task can be created that contains existing tools that are otherwise found in separate areas. One example would be a toolbox containing tools typically used during symbol creation.
Tools can be created that perform multiple commands by stringing commands together in the Key-In field of the tool. Commands are separated with semicolons. For example, a tool can be created to select a certain Wire Use and then invoke a "draw wire" type of command. Wire Uses are also known as Wire Layers. The Key-In for such a tool would be:
ECAD COMBOWIRELAYERS combosetinx <Wire Use>; ECAD EXEC DRAWWIRE
Substitute the desired wire use, such as 3Phase for <Wire Use>. Be aware that the wire use name is case-sensitive. Substitute the desired wire command, such as ECAD EXEC THREEPHASELINE, for ECAD EXE DRAWWIRE. Use Workspace > Customize to look at the tools in the Wiring toolbox in the .DGNLIB file supplied with the software to see their Key-in commands.
A tool could be created to turn on or off a level or group of levels. To turn off a level called MY_LEVEL, the key-in would be:
level set display off MY_LEVEL
To turn the level on:
level set display on MY_LEVEL
To toggle the level:
level set display toggle MY_LEVEL
A tool could be created to set certain active element properties and then initiate a drawing tool. An example of this would be a tool that sets the active color to 2 (green), sets the active line style to 3 (dashed), sets the active line weight to 5, then initiates the Draw Wire tool. The key-in for this tool would be:
active color 2; active style 3;active weight 5; ECAD EXEC DRAWWIRE
A tool to complement the custom Draw Wire tool in the previous example would be one that sets the active element properties back to "normal". The following Key-in sets the active color to ByLevel, and the line style and weight to 0. Your "normal" may differ.
active color bylevel; active style 0;active weight 0
DGNLIB files are cumulative. To remove an item from the interface it must be removed from all DGNLIB files the software is using. In other words, to remove an unwanted interface item supplied with the software, remove it from the DGNLIB file supplied with the software. Merely leaving the unwanted item out of a custom.dgnlib file does not remove it from the interface. Backup the supplied DGNLIB file before modifying it.
A tool to hide elements not in the current selection set can be handy, especially for 3D design work. The key-in for this is
displayset set selection
Another tool could be created to re-display the hidden elements. The key-in for this is
displayset clear
If these tools are added to the View Popup Menu area > custom.dgnlib on the Customize dialog, they will appear when you right-click the drawing while holding SHIFT.
Use Utilities > Key-in and MicroStation Help to experiment with other key-in commands that might make useful tools. Recording a macro (Utilities > Macro > VBA Project Manager) while executing the desired actions is sometimes useful to find the necessary key-ins. See How to extract keyins for the tool settings in MicroStation V8i for information on affecting the settings box that appears with many tools.
Platform Fundamentals for promis.e Standalone Users
Creating Tool Icons
AskInga - Export MicroStations icons from the open DGN library
AskInga - What command was that?
AskInga - Combine your keyins
AskInga - How to extract keyins for the tool settings in MicroStation V8i
YouTube - Demonstration of menu customization in Microstation V8i