Technical data
The model.rtw File
2-5
This example shows several records and corresponding subrecords by use of 
arrows. 
Parameter (Scope 4) is a subrecord of Block (Scope 3), which is a 
subrecord of 
System (Scope 2), which in turn is a subrecord of CompiledModel 
(Scope 1).
The 
model.rtw file uses curly braces { and } to open and close scopes. Using 
scopes, you can access any value within the 
model.rtw file. The scope in this 
example begins with 
CompiledModel. You use periods (.) to access values 
within particular scopes. For example, to access 
Name within CompiledModel, 
you would use
CompiledModel.Name
To access Identifier within System within CompiledModel, you would use
CompiledModel.System.Identifier
To access Name within the second Parameter record within Block within System 
within 
CompiledModel, you would use
CompiledModel.System.Block.Parameter[2].Name
This process can be simplified by using the %with directive. See the “Scoping” 
section later in this chapter for more information.
The identifier and record name become TLC variables when the Target 
Language Compiler loads the 
model.rtw file.
The Target Language Compiler lets you traverse the hierarchy defined by 
model.rtw so that you can customize the output to suit your particular needs. 
To be able to do this, you must understand the structure of the 
model.rtw file. 
Appendix A contains a complete description of the 
model.rtw file.










