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 are used to 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), and definitions (which may or may not be represented by symbols). The BEGIN .. END or { } structure is used to specify 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
Diagram “Name of Diagram 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, thusly:
Definition “Name of Definition Type”
{
PROPERTY { [specification of property] }PROPERTY { [specification of property] }
...
}
Certain keywords that create clauses within a property also require opening and closing braces to delineate 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 may 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 (within the ensuing dialog), until the next CHAPTER command is encountered 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 property] }
PROPERTY { [specification of property] }
GROUP "Things That Go Together"
{
PROPERTY { [specification of property] }
PROPERTY { [specification of property] }
}
...
}
Lists
You may 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 ONE OF, LISTOF, and EXPRESSIONOF commands within a property statement, and are discussed later. Textual lists are built by specifying the values of the list in a separate list statement, with the values enclosed within opening/closing braces or a BEGIN.. END structure. The LIST statement is normally placed near the top of the USRPROPS.TXT file, and referenced within 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 solely 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 }
While this format is perfectly acceptable to System Architect, it probably makes maintenance of the USRPROPS.TXT file more difficult, and should therefore be avoided.