Model elements Creating a controlled file Controlled files can be created using many methods. A controlled file can be created by browsing and selecting a file from the file system or by using a command. To select a method: 1. To select the way a controlled file is created, double-click a package in the Rational Rhapsody browser and select the Properties tab from the Features window. 2. With the All filter selected, expand the section Model and expand the ControlledFile subsection. The property NewPolicy controls the way a controlled file is created. The default selection is SystemDefault . The property can be set to UseOpenCommand or UseRhapsodyCodeEditor . Љ SystemDefault :
This setting lets the program (as done in hyperlink, for example), open the file according to the MIME-type mapping. Љ UseOpenCommand : This setting means that double-clicking on the controlled file runs the open command. The open command is set in the OpenCommand property (Model/ControlledFile/OpenCommand). This is a string property that expands the keyword $fileName to the full path of the Controlled File. In the event of property inconsistency, where the program is set to run the UseOpenCommand but the command contains no setting, the SystemDefault policy will be used. Љ UseRhapsodyCodeEditor : This setting allows the file to be opened within the internal Rational Rhapsody code editor.
If you want to open the controlled file after it is created, set the value of the property OpenFileAfterCreation to yes. The file will open the file immediately after it is created. 350 User Guide