Details View Parameters

You can write scripts that create, query, or remove the parametrization of a property in the Details view of a native tree object. For example, in Mechanical, to the right of any property that can be parametrized, you can click the box, which causes a P to display, indicating that it is now a parameter.

 

This also adds the Parameter Set bar to the Workbench Project Schematic. Double-clicking the Parameter Set bar opens it so that you can see all input and output parameters in the project.

To parametrize a native property using an API, you use the method:

CreateParameter("PropertyName")

This method returns an instance of the DetailsViewParameter class. It can be used to query the Workbench ID for the parameter in the Parameter Set bar. You can also query the object and property name for which the parameter was created:

ID GetParameter(name)

Object GetParameter(name)

PropertyName GetParameter(name)

To no longer have a property be a parameter, you use the method:

RemoveParameter("PropertyName")

For a scripting example, see Parametrize a Property for a Tree Object.