Customizing View Creation dialog
See the following procedures for customizing the predefined SysMLViewCreationDialog configuration for the View Creation dialog and submenu.
The procedures on this page use the example of customizing the SysMLViewCreationDialog part definition. However, you can similarly customize any other custom view creation dialog customization part definition you may have.
Updating the View Creation dialog/submenu
Reload the project for changes made to the customized View Creation dialog/submenu to take effect. Then, specify the active View Dialog via the Activating View Creation dialog.
Reusing a View Creation dialog/submenu
To reuse a View Creation dialog/submenu
- In the Containment tree, create a new root namespace.
- Open the Textual Editor for the new namespace.
- In the Textual Editor, create a package and name it.
- Within the body of the package, declare a part definition, specify the name for the dialog instance, subclassify the SysMLViewCreationDialog definition from the DS_UIComponents::UIComponents package, then, within the body of the definition:
- Click the Synchronize button.
package CustomViewCreationDialogs {
part def CustomizedViewCreationDialog :> DS_UIComponents::UIComponents::SysMLViewCreationDialog { // redefining and renaming the SysMLViewCreationDialog
}
}
Renaming the Create View command
The default name for the View Creation dialog's invocation command is Create View.
To rename the Create View command
- Within the body of the part definition element of the new View Creation dialog instance, redefine the actionName attribute with the new view creation command name.
- Click the Synchronize button.
part def CustomizedViewCreationDialog :> DS_UIComponents::UIComponents::SysMLViewCreationDialog {
attribute :>> actionName default "Create Diagram"; // renaming the view creation command to "Create Diagram"
}
Modifying the View Creation dialog/submenu command categories
Command categories
View Creation dialog/submenu command categories predefined in the 3DS SysML Customization library's DS_UIComponents::UIComponents::SysMLViewCreationDialog are:
- sysMLViewsMenu - for the symbolic views command category in the View Creation dialog/submenu.
- sysMLTableMenu - for the tabular views command category in the View Creation dialog/submenu.
Creating view creation command categories for the View Creation dialog/submenu
To create view creation command categories for the View Creation dialog/submenu
- See the Creating view creation command categories for the View Creation dialog/submenu procedure on the Creating View Creation dialog page.
Removing view creation command categories from the View Creation dialog/submenu
To remove view creation command categories from the View Creation dialog/submenu
- Within the body of the part definition element of the new View Creation dialog instance, redefine the command category you want to customize, inherited from the SysMLViewCreationDialog definition and set the multiplicity to zero.
- Click the Synchronize button.
part def CustomizedViewCreationDialog :> DS_UIComponents::UIComponents::SysMLViewCreationDialog {
part :>> sysMLTableMenu [0]; // removing the sysMLTableMenu command category by setting the multiplicity to zero
}
Modifying the view creation command category attributes of the View Creation dialog/submenu
Command category attributes
View Creation dialog/submenu command category attributes predefined for sysMLViewsMenu and sysMLTableMenu in DS_UIComponents::UIComponents::SysMLViewCreationDialog are:
- attribute :>> label default "Symbolic Views"; // attribute specifies the category name
- attribute :>> isCollapsed default true; // attribute specifies whether the category is collapsed or expanded by default
- If the dialog/submenu contains only one command category, then the category name is not displayed. In this case, both the label and isCollapsed attributes are ignored.
- If the dialog/submenu contains fewer than ten view commands, then the category cannot be collapsed. In this case, the isCollapsed attribute is ignored.
To modify the view creation command category attributes of the View Creation dialog/submenu
- Within the body of the part definition element of the new View Creation instance, redefine the command category you want to customize, inherited from the SysMLViewCreationDialog definition.
- Within the body of the redefining category, redefine the inherited attributes that you want to modify with the needed values.
- Update the values as needed.
- Click the Synchronize button.
part def CustomizedViewCreationDialog :> DS_UIComponents::UIComponents::SysMLViewCreationDialog {
part :>> sysMLViewsMenu {
attribute :>> isCollapsed default true; // modified command category default collapse state
attribute :>> label default "SysML v2 Symbolic Views"; // modified command category name
}
}
Modifying the View Creation dialog/submenu commands
Commands in categories
View Creation dialog/submenu commands predefined for sysMLViewsMenu and sysMLTableMenu in DS_UIComponents::UIComponents::SysMLViewCreationDialog are:
- sysMLViewsMenu:
- gvItem - command for General View
- ivItem - command for Interconnection View
- afvItem - command for Action Flow View
- stvItem - command for State Transition View
- sysMLTableMenu:
- gtItem - command for General Table
- rtItem - command for Requirements Table
Removing view creation commands from the View Creation dialog/submenu command categories
To remove view creation commands from the View Creation dialog/submenu command categories
- Place the cursor within the body of the part element redefining a View Creation dialog/submenu command category.
- Declare a part usage, then redefine the command you want to remove and set its multiplicity to zero.
- Click the Synchronize button.
part def CustomizedViewCreationDialog :> DS_UIComponents::UIComponents::SysMLViewCreationDialog {
part :>> sysMLViewsMenu {
part :>> afvItem [0]; // removing the afvItem command from the sysMLViewsMenu category by setting the multiplicity to zero
}
}
Renaming view creation commands in the View Creation dialog/submenu command categories
To rename view creation commands in the View Creation dialog/submenu command categories
- Place the cursor within the body of the part element redefining a View Creation dialog/submenu command category and declare a part usage, then redefine the command you want to modify.
- Within the body of the redefining usage, redefine the inherited label attribute with the needed value.
- Click the Synchronize button.
part def CustomizedViewCreationDialog :> DS_UIComponents::UIComponents::SysMLViewCreationDialog {
part :>> sysMLViewsMenu {
part :>> afvItem {
attribute :>> label default "Action Flow Diagram"; // modified command name
}
}
}
Adding view creation commands to the View Creation dialog/submenu command categories
To add view creation commands to the View Creation dialog/submenu command categories
- See the Adding view creation commands to the View Creation dialog/submenu command categories procedure on the Creating View Creation dialog page.