Including one PRP file in another

To include one .prp file in another, use the Include directive. IBM® Engineering Systems Design Rhapsody® replaces the directive with the contents of the specified file.

About this task

The syntax of the directive is as follows:


Include "path"

The specified path can be relative to the file that does the include, and should include the .prp extension. In addition, the path can include an environment variable. For example:


Include "$MY_PATH\some_dir\my_file.prp"

To include more than one .prp file, simply use multiple directives. For example:


Include "$MY_DIR\my_file1.prp"
Include "$MY_DIR\my_file2.prp"

Note the following information:

  • Include statements must be outside of a Subject block, either before or after. Therefore, Rhapsody expects every included .prp file starts with a Subject line. If not, Rhapsody generates an error.
  • Rhapsody does not check for loops. Therefore, a loop in the include files might cause an infinite loop when the .prp file is read.
  • You can nest include statements. For example:
    
    Include "C:\Rhapsody\Share\Properties\IndividualSite.prp"
    
    Subject General
       Metaclass Model
          Property BackUps Enum "None,One,Two" "Two"
       end
    end
    Include "..\Properties\IndividualSite.prp"
    
    Subject General
       Metaclass Model
          Property AutoSaveInterval Int    "11"
       end
    end
    Include "IndividualSite.prp"