The Tools tab allows you to create custom menu commands that can start external tools directly from UModel. The custom menu commands that you define here appear under the menu Tools | User-defined tools. External tools can be programs included with Windows, such as Windows Explorer (explorer.exe), Notepad (notepad.exe), or other custom executables. You can optionally assign arguments to each user-defined tool and set the directory where the external tool should initialize (in order to look for relative file names).
For example, the configuration illustrated below adds a new menu command called "Open Project Folder". When run, this command will open the directory of the current UModel project in Windows Explorer.
When an external tool takes arguments (like Windows Explorer in the example above), these can be entered in the Arguments input box. To supply multiple arguments, separate them with the space character. The values you can supply as arguments can be plain text (hard-coded values) or be selected with the button from a list of predefined UModel variables. You can use any of the following UModel predefined variables as arguments:
UModel predefined variable
Project File Name
The file name of the active UModel project file, for example Test.ump.
Project File Path
The absolute file path of the active UModel project file, for example, C:\MyDirectory\Test.ump.
Focused UML Data – Name
The name of the currently focused UML element, for example, Class1.
Focused UML Data – UML Qualified Name
The qualified name of the currently focused UML element, for example, Package1::Package2::Class1.
Focused UML Data – Code File Name
The code file name of the currently focused UML class, interface or enumeration as shown in the Property window (relative to the realizing component), for example, Class1.cs or MyNamespace\Class1.Java.
Focused UML Data – Code File Path
The code file path of the currently focused UML class, interface or enumeration as shown in the Property window, for example, C:\Temp\MySource\Class1.cs.
Focused UML Data – Code Project File Name
The file name of the code project to which the currently focused UML class, interface or enumeration belongs.
The code project file name can be relative to the UModel project file and is the same as shown in the Properties of the component, for example, C:\Temp\MySource\MyProject.vcproj or MySource\MyProject.vcproj.
Focused UML Data – Code Project File Path
The file path of the code project to which the currently focused UML class, interface or enumeration belongs, for example, C:\Temp\MySource\MyProject.vcproj.
The directory where the current UModel project is saved, for example, C:\Users\<user>\Documents\Altova\UModel2023\UModelExamples\.
The directory where the application's temporary files are saved, for example, C:\Users\<user>\AppData\Local\Temp.
In some cases, you may also need to enter a value in the Initial Directory input box. For example, the configuration below opens in Notepad the code file of the currently selected element on a diagram. (Note that, for this command to work, the element currently selected on the diagram must have a value (file name) defined in the code file name field of the Properties Window, and that file must exist in C:\UML_Bank_Sample\CSharpCode directory).