Customizing the metamodel > Symbols: Creating and modifying > Controlling name presentation
  
Controlling name presentation
SABASIC scripts can be defined to control symbol name presentation in System Architect.
Example USRPROPS.TXT script
rename symbol "User 1" to "!Test"
rename diagram "User 1" to "!Test"

assign "!Test" to "!Test"

SYMBOL "!Test"
{
       defined by "Description"
       PROPERTY "Present scripted name" {edit boolean default "T"}
       PROPERTY "Scripted name source" { edit text default "ScriptedNameExample" invisible }
}
Example SABASIC script
' Globals available..
' FmtName$
' FmtResult$
' FmthDef& - note might be 0 if sym is undefined so test before using
' FmthSym&
sub ScriptedNameExample()
       GetCurrentDiagram(hDgm&)

       ' Show type numbers above sym name
       symType$ = String$(255, " ")
       GetSymbolField(hDgm&, FmthSym&, SYMFLD_TYPE, symType$, 255)
       Result$ = "sym:" + symType$

       if FmthDef& > 0 then
              defType$ = String$(255, " ")
              GetDefinitionType(FmthDef&, defType%)
              Result$ = Result$ + " def:" + Str$(defType%)
       end if

       symName$ = String$(MAXNAME+1, " ")
       GetSymbolField(hDgm&, FmthSym&, SYMFLD_NAME, symName$, MAXNAME)
       Result$ = Result$ + chr$(13) + chr$(10) + symName$

       FmtResult$ = symName$
       if len(Result$) < FMTMAXRESULT then
              FmtResult$ = Result$
       end if
end sub
See also
Symbols: Creating and modifying