Skip to main content

Adding Class Parameters to a Class


InterSystems® Studio has been deprecatedOpens in a new tab. Beginning with version 2024.2, it is no longer included with installations of InterSystems IRIS®, and it is no longer receiving maintenance updates. An upgrade to InterSystems IRIS 2024.2 or later will remove any Studio installation which is associated with the instance.

The version of InterSystems Studio which was included with InterSystems IRIS 2024.1 is available as a stand-alone component from the WRC Downloads page ( in a new tab). To show only the Studio downloads, type studio in the Name column. Neither upgrades nor new installations of InterSystems IRIS will affect a stand-alone Studio installation.

InterSystems provides the following documentation about Studio 2024.1 for legacy support only. InterSystems recommends that all users develop ObjectScript code using the InterSystems ObjectScript Extension Pack for Visual Studio Code. See Migrate from Studio.

A class parameter defines a constant value for all objects of a given class. When you create a class definition (or at any point before compilation), you can set the values for its class parameters. By default, the value of each parameter is the null string; to set a parameter's value, you must explicitly provide a value for it. At compile-time, the value of the parameter is established for all instances of a class. This value cannot be altered at runtime.

You can add a class parameter to a class definition in two ways:

  • Adding a class parameter to the class definition using the Class Editor.

  • Using the New Class Parameter wizard.

To add a parameter using the Class Editor, position the cursor on a blank line in the Class Editor and enter a class parameter such as:

Parameter P1 = "x";

For details on parameter definitions, see Defining and Referring to Class ParametersOpens in a new tab. Also see Parameter DefinitionsOpens in a new tab in the Class Definition Reference.

New Class Parameter Wizard

You can use the New Class Parameter Wizard to create a new class parameter. You can open the New Class Parameter wizard by selecting Class > Add > Class Parameter . Alternatively, right-click the Class Inspector and select Add > New Class Parameter. You can also click the New Class Parameter button pink cube with a yellow starburst on the toolbar.

The New Class Parameter wizard prompts you for information. Select Finish at any time (default values are provided for any information you have not specified).

The New Class Parameter wizard prompts you for the following information (you can later modify any of these values):


(required) Name of the class parameter. This name must be a valid parameter name and must not conflict with the name of a previously defined parameter.

See Rules and Guidelines for IdentifiersOpens in a new tab.


(optional) Description of the new class parameter. This description is used when the class' documentation is displayed in the online class library documentation.

A description may include HTML formatting tags. See Creating Class DocumentationOpens in a new tab in Defining and Using Classes.


Default value for the class parameter. This will be the default value for this parameter for all instances of this class.

FeedbackOpens in a new tab