How Parameters Behave in The Logic Section
In the body of an event handler, you can use the parameter name as it is defined in the PropertySet section of the SPDL file as an object pointer. This allows you to utilize the Parameter object’s functionality, notably:
• Because the default property of the Parameter object is the Value property, you can return the parameter’s value simply by using the name of the parameter. For example, assuming you defined a parameter using the name MyParam, the following JScript snippets are identical:
// Using the default value Application.LogMessage( MyParam ); // Using the Value property explicitly Application.LogMessage( MyParam.Value );
• You can use the Enable method to toggle between enabling and disabling the UI control for that parameter:
// Enabling MyParam.Enable(true); // Disabling MyParam.Enable(false); // Toggling between the two states MyParam.Enable( !MyParam.Enable() );
• Similarly, you can use the Show method to toggle between showing and hiding the UI control for that parameter:
// Showing MyParam.Show(true); // Hiding MyParam.Show(false); // Toggling between the two states MyParam.Show( !MyParam.Show() );
Autodesk Softimage v7.5