Customizing the metamodel > Customizing the repository metamodel: SAPROPS.CFG and USRPROPS.TXT > Composition and syntax > Grouping commands to create modeling elements
  
Grouping commands to create modeling elements
Opening and closing braces, { } or BEGIN...END commands group commands in order to form modeling elements.
Diagrams, symbols, and definitions
System Architect’s repository supports three main modeling elements, sometimes referred to as dictionary classes:
diagrams
symbols, which are drawn on diagrams
definitions, which might or might not be represented by symbols.
The BEGIN .. END or { } structure specifies the contents of these modeling elements, as follows:
Diagram "Name of Diagram Type"
{
[contents]
}
Symbol "Name of Symbol Type"
{
[contents]
}
Definition "Name of Definition Type"
{
[contents]
}
or
Definition "Name of Definition Type"
BEGIN
[contents]
END
and so on
Properties
The contents of these modeling elements consist of properties and layout commands. The BEGIN..END or { } structure is used to group property commands, as follows:
Definition "Name of Definition Type"
{
PROPERTY { [specification of property] }
PROPERTY { [specification of property] }
...
}
Some keywords that create clauses in a property also require opening and closing braces to indicate the command's arguments, such as the KEYED (BY) command.
Definition "Name of Definition Type"
{
PROPERTY { [specification of property] KEYED BY { [clause] } }
...
}
Layout
The LAYOUT command also requires opening and closing braces or a BEGIN .. END statement.
Definition "Name of Definition Type"
{
LAYOUT { [specification of layout] }
PROPERTY { [specification of property] }
PROPERTY { [specification of property] }
...
}
Chapter
Properties in a dialog can be further grouped into tabs and groups. Tabs are specified by a CHAPTER command. The CHAPTER command must not have opening and closing braces or BEGIN .. END statements. It groups all properties below it in a specification into a tab (in the dialog that follows), until the next CHAPTER command is found in the specification.
Definition “Name of Definition Type”
{
LAYOUT { [specification of layout] }
CHAPTER "First Tab"
PROPERTY { [specification of property] }
PROPERTY { [specification of property] }
...
CHAPTER "Second Tab"
PROPERTY { [specification of property] }
PROPERTY { [specification of property] }
...
}
Groups
Unlike the CHAPTER command, GROUPs do require the opening and closing braces or a BEGIN .. END statement.
Definition "Name of Definition Type"
{
LAYOUT { [specification of layout] }
CHAPTER "First Tab"
PROPERTY { [specification of layout] }
PROPERTY { [specification of layout] }
GROUP "Things That Go Together"
{
PROPERTY { [specification of layout] }
PROPERTY { [specification of layout] }
}
...
}
Lists
You can also specify lists in an encyclopedia, either preset lists containing textual values or lists of definitions that you create while modeling. Lists of definitions that you create while modeling are built using the ONEOF, LISTOF, and EXPRESSIONOF commands within a property statement. Textual lists are built by specifying the values of the list in a separate list statement, with the values enclosed in opening/closing braces or a BEGIN.. END structure. The LIST statement is normally put near the top of the USRPROPS.TXT file, and referenced in the appropriate property specification of a diagram, symbol, or definition.
LIST "List of Things"
{
VALUE One
VALUE Two
VALUE "Two and a Half"
}
A note on syntax
Indentations and new lines are used to enhance readability, and have no meaning to the USRPROPS.TXT processor other than to act as whitespace separators between strings. The above example could be written like this:
LIST "List of Things" { VALUE One VALUE Two VALUE "Two and a Half" VALUE }
This format is acceptable to System Architect, but it might make maintenance of the USRPROPS.TXT file more difficult, and should be avoided.
See also
Composition and syntax