Workbench User Guide : 4. Creating Applications : Create an Application : How You Can Customize a Session for an Application
 
Share this page                  
How You Can Customize a Session for an Application
You can customize your current development session for an application by setting the following values for the duration of the development session:
Initial values for the global variables and constants in the application
You can create files to store different sets of initial values. This feature is useful if, for example, you want to change the application's language for a session.
Command line parameters for running the application
You can specify parameters that determine how to run the application during the current development session.
Specify Initial Values for Global Variables and Global Constants
You can change the initial values of global variables and constants in an application by performing the following procedures:
Create an initialization file to store the global values.
Specify which initialization file to use for the current session.
To create an initialization file
Use an external text editor to create a text file containing the names of variables, constants, and their initial values. For each variable or constant to be initialized, the file should have one line with the following format:
name='value'
name
Specifies the name of the global variable or constant
value
Specifies the initial value to assign to the global or constant
Note:  To embed quotation marks or backslashes, precede them with a backslash (\).
You can create any number of files. For example, you might have one file for each foreign language used in your organization.
Example initialization file:
language='French'
country='Canada'
businesssector='R&D \'New Projects\' Group'
style='Eclipse'
To specify an initialization file for the current OpenROAD session
1. Click the Develop tab.
2. Select your application in the Applications portlet.
3. Click the Application Properties portlet tab.
4. Click File, Open.
The application properties are opened for editing.
5. Click the control button to the right of the Globals Initialization File field.
OpenROAD displays a standard File Selection dialog.
6. Select the text file containing the global values you want to use for your application, and then click Open.
Alternatively, enter the name of the file.
7. Click File, Save and Close to save and close the application properties.
Note:   
An alternative way to specify the file name is to use the -g parameter when you run the application with the RunImage utility. For more information about using the RunImage utility, see Run an Application from an Image Using the RunImage Utility and RunImage Utility Parameters.
For more information about defining global variables, see Create a Global Variable.
Specify Runtime Parameters for a Session
You can also specify command line parameters to customize how an application runs during a development session. These parameters may be either positional or keyword parameters, and they take effect when you run the application with the Run command or with the RunImage utility.
To specify runtime parameters for an application
1. Click the Develop tab.
2. Select your application in the Applications portlet.
3. Click the Application Properties portlet tab.
4. Click File, Open.
The application properties are opened for editing.
5. Enter the desired parameters for running the application in the Parameters field.
For more information about the fields on the Application Properties portlet, see Application Properties.
6. Click File, Save and Close to save and close the application properties.
Note:  For details about running an application using the Run command see the chapter "Debugging Your Application" in the Programming Guide. For more information about the RunImage utility, see Run an Application from an Image Using the RunImage Utility.