Customizing the metamodel : Metamodel graphical editor : Advanced use of user-defined definitions
  
Advanced use of user-defined definitions
If you have advanced knowledge of the System Architect scripting language then you can easily extend the definition types that are created by adding "text blocks" in the wanted section of the usrprops.txt file. You would do this by creating a User Object Fragment definition. This allows you to create command fragments such as #ifdef and #endif statements.
Here is an example of using #idef and #endif to add text blocks in a section of the usrprops.txt file. If you want to add the following:
#ifdef "UML Object-oriented"
SYMBOL "Component2"
{
Assign To "Component"
PROPERTY "Stereotype" { INVISIBLE EDIT Text ListOnly
List "Component Stereotypes" DEFAULT "" LENGTH 32}
}
#endif
You must create User Object Fragments, User Symbol Types, User Symbol Properties, User List, and a User Props File definitions.
1 Create a User Object Fragment called PreSymbolFragment and in the Text field you would add #ifdef "UML Object-Oriented".
2 Create a User Object Fragment called PostSymbolFragment and in the Text field you would ad #end if.
3 Create a User Symbol Type called Component 2.
4 In the Assign To Diagram property type in Component and select Yes for the Advanced Properties.
5 Create a User Symbol Property called Stereotype and add in Component2 as the User Symbol Type property.
6 In the Properties tab of the User Symbol Type Component 2 you would select the Choices button and add in the User Symbol Property called Stereotype.
7 Create a User List called Component Stereotypes.
8 Open the User Symbol Type definition called Component 2.
9 Under the Advanced tab add in the PreSymbolFragment in the Text Fragment before Symbol section and PostSymbolFragrament in the Text Fragment after Symbol section.
10 Create a User Props Definition and add in the User List and User Symbol Type definition into the Select Objects in the sequence to be generated.
11 Now you are ready to generate the User Props txt file to include the above changes and add them into a production encyclopedia.
You can also include references to other files in the usrprops.txt, by using the #include command. Type the actual file fragment in the User File Fragment’s Text property and then add it in the proper place in the User Props File definition.