Customizing Relationship Creation dialog
See the following procedures for customizing the predefined SysMLRelationshipCreationDialog configuration for the Relationship Creation dialog and submenu.
Updating the Relationship Creation dialog/submenu
Once you have created the new Relationship Creation dialog/submenu, activate it via the (2026x Refresh1) Activating Relationship Creation dialog.
The procedures on this page use the example of customizing the SysMLRelationshipCreationDialog part definition. However, you can similarly customize any other custom relationship creation dialog customization part definition you may have.
Reusing a Relationship Creation dialog/submenu
To reuse a Relationship 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, and subclassify the SysMLRelationshipCreationDialog definition from the DS_UIComponents::UIComponents package, then, within the body of the definition:
- Click the Synchronize button.
package CustomRelationshipCreationDialogs {
part def CustomizedRelationshipCreationDialog :> DS_UIComponents::UIComponents::SysMLRelationshipCreationDialog { // redefining and renaming the SysMLRelationshipCreationDialog
}
}
Renaming the Create Relation command
The default name for the Relationship Creation dialog's invocation command is Create Relation.
To rename the Create Element command
- Within the body of the part definition element of the new Relationship Creation dialog instance, redefine the actionName attribute with the new element creation command name.
- Click the Synchronize button.
package CustomRelationshipCreationDialogs {
part def CustomizedRelationshipCreationDialog :> DS_UIComponents::UIComponents::SysMLRelationshipCreationDialog {
attribute :>> actionName default "Create SysMLv2 Relationships"; // renaming the element creation command to "Create SysMLv2 Relationships"
}
}
Modifying the Relationship Creation dialog/submenu command categories
Command menus
Relationship Creation dialog/submenu command categories predefined in the 3DS SysML Customization library's DS_UIComponents::UIComponents::SysMLRelationshipCreationDialog are:
- sysMLSourceRelationshipsMenu - an outgoing relations creation commands' category in the Relationship Creation dialog/submenu.
- sysMLTargetRelationshipsMenu - an incoming relations creation commands' category in the Relationship Creation dialog/submenu.
Creating relationship creation command categories for the Relationship Creation dialog/submenu
To create relationship creation command categories for the Relationship Creation dialog/submenu
- See the Creating relationship creation command categories for the Relationship Creation dialog/submenu procedure on the (2026x Refresh1) Creating Relationship Creation dialog page.
Modifying relationship creation command categories in the Relationship Creation dialog/submenu
To modify relationship creation command categories in the Relationship Creation dialog/submenu
- Within the body of the part definition element of the new Relationship Creation dialog instance, do one of the following:
- To modify the dialog so it contains only one category:
- Declare a part usage for the category, name it, and redefine either sysMLSourceRelationshipsMenu for outgoing or sysMLTargetRelationshipsMenu for incoming relations.
- Remove the remaining category.
- To modify both categories in the dialog:
- Modify the outgoing category:
- Declare a part usage for the outgoing relations category, name it, and redefine the sysMLSourceRelationshipsMenu.
- Declare a part usage for the incoming relations category, name it, and subset the outgoing relations category, whose name you have specified in the previous step.
- Modify the incoming relation creation command category's name by updating the label attribute. Otherwise, the 'Outgoing' label is used through inheritance.
- Remove the sysMLTargetRelationshipsMenu category. Because the incoming relations category is instantiated by subsetting the outgoing relations category (or vice versa), you need to remove the inherited sysMLTargetRelationshipsMenu category to avoid having three categories.
- Modify the outgoing category:
- Click the Synchronize button.
// modifying the dialog so it contains only one category:
package CustomRelationshipCreationDialogs {
part def CustomizedRelationshipCreationDialog :> DS_UIComponents::UIComponents::SysMLRelationshipCreationDialog {
part customOutgoing :>> sysMLSourceRelationshipsMenu { } // redefining the sysMLSourceRelationshipsMenu for outgoing relations
part :>> sysMLTargetRelationshipsMenu [0]; // removing the sysMLRelationshipsMenu command category by setting the multiplicity to zero
}
}
// modifying both categories in the dialog:
package CustomRelationshipCreationDialogs {
part def CustomizedRelationshipCreationDialog :> DS_UIComponents::UIComponents::SysMLRelationshipCreationDialog {
part customOutgoing :>> sysMLSourceRelationshipsMenu { } // redefining the sysMLSourceRelationshipsMenu for outgoing relations
part customIncoming :> customOutgoing { // subsetting the customOutgoing for incoming relations
attribute :>> label default "Incoming"; // modifying the incoming relation creation command category's name
attribute :>> isIncoming default true; // modifying the category's commands to be for incoming relations
}
part :>> sysMLTargetRelationshipsMenu [0]; // removing the inherited sysMLRelationshipsMenu command category by setting the multiplicity to zero
}
}
Removing relationship creation command categories from the Relationship Creation dialog/submenu
To remove relationship creation command categories from the Relationship Creation dialog/submenu
- Within the body of the part definition element of the new Relationship Creation dialog instance, redefine the command category you want to customize, inherited from the specified definition (e.g., SysMLRelationshipCreationDialog), and set the multiplicity to zero.
- Click the Synchronize button.
package CustomRelationshipCreationDialogs {
part def CustomizedRelationshipCreationDialog :> DS_UIComponents::UIComponents::SysMLRelationshipCreationDialog {
part :>> sysMLTargetRelationshipsMenu [0]; // removing the sysMLRelationshipsMenu command category by setting the multiplicity to zero
}
}
Modifying the relationship creation command category attributes of the Relationship Creation dialog/submenu
Command menu attributes
Relationship Creation dialog/submenu command category attributes predefined in the 3DS SysML Customization library's DS_UIComponents::CoreUIComponents::Components::ItemsCategory, AbstractItem, and DS_UIComponents::CoreUIComponents::Dialogs::RelationshipCreationDialog::itemCategories are:
- attribute :>> label default "Outgoing"; // attribute specifies the category name
- attribute :>> isCollapsed default false; // attribute specifies whether the category is collapsed or expanded by default
- attribute :>> isIncoming default true; // attribute specifies whether the category is for incoming or outgoing relations; true - incoming; undefined or false - outgoing
If the dialog/submenu contains fewer than ten element creation commands, then the category cannot be collapsed. In this case, the isCollapsed attribute is ignored.
To modify the relationship creation command category attributes of the Relationship Creation dialog/submenu
- Within the body of the part definition element of the new Relationship Creation dialog instance, redefine the command category you want to customize, inherited from the SysMLRelationshipCreationDialog definition.
- Within the body of the redefining category, redefine the inherited attributes that you want to modify with the needed values.
- Click the Synchronize button.
package CustomRelationshipCreationDialogs {
part def CustomizedRelationshipCreationDialog :> DS_UIComponents::UIComponents::SysMLRelationshipCreationDialog {
part customOutgoing :>> sysMLSourceRelationshipsMenu {
attribute :>> label default "Source"; // modifying the outgoing relation creation command category name
attribute :>> isCollapsed default false; // modifying relationship creation command category default collapse state
}
part customIncoming :> customOutgoing {
attribute :>> isIncoming default true; // modifying the category's commands to be for incoming relations
attribute :>> label default "Target"; // modifying the incoming relation creation command category name
}
part :>> sysMLTargetRelationshipsMenu [0];
}
}
Modifying the Relationship Creation dialog/submenu commands
Commands in menus
You can see all the Relationship Creation dialog/submenu commands predefined for the sysMLRelationshipMenu in DS_UIComponents::UIComponents::SysMLRelationshipCreationDialog::sysMLSourceRelationshipsMenu and sysMLTargetRelationshipsMenu.
Removing relationship creation commands from the Relationship Creation dialog/submenu command categories
To remove relationship creation commands from the Relationship Creation dialog/submenu command categories
- Place the cursor within the body of the part element redefining a Relationship 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.
package CustomRelationshipCreationDialogs {
part def CustomizedRelationshipCreationDialog :> DS_UIComponents::UIComponents::SysMLRelationshipCreationDialog {
part customOutgoing :>> sysMLSourceRelationshipsMenu {
part :>> assertConstraintUsageItem [0]; // removing the actionUsageItem element creation command from the sysMLElementsMenu category by setting the multiplicity to zero
}
part :>> sysMLTargetRelationshipsMenu [0];
}
}
Renaming relationship creation commands in the Relationship Creation dialog/submenu command category
To rename relationship creation commands in the Relationship Creation dialog/submenu command category
- Place the cursor within the body of the part element redefining a Relationship 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.
package CustomRelationshipCreationDialogs {
part def CustomizedRelationshipCreationDialog :> DS_UIComponents::UIComponents::SysMLRelationshipCreationDialog {
part customOutgoing :>> sysMLSourceRelationshipsMenu {
part :>> assertConstraintUsageItem {
attribute :>> label default "assert constraint usage"; // modified command name
}
}
part :>> sysMLTargetRelationshipsMenu [0];
}
}
Adding relationship creation commands to the Relationship Creation dialog/submenu command categories
To add relationship creation commands to the Relationship Creation dialog/submenu command categories