IDLitParameter::SetData
Syntax | Return Value | Arguments | Keywords | Version History
The IDLitParameter::SetData function method is used to set data in this interface, associating a data object with a given parameter. This method can automatically perform type matching to determine which parameter to associate with a particular parameter or the user can specify a parameter name.
If a parameter name is provided by the user via the PARAMETER_NAME keyword, this method will query the given data object for a data item that is of one of the types supported by this parameter and associate the found data item with the parameter. This could be the data object provided or if the data object contains other data objects, one of its children. If a type match doesn't occur, the method will return 0.
If no parameter name is provided, this method will start with the first available parameter (non-associated parameters, starting with op-targets first) and attempt to perform a data type match. When a data type match between the parameter and the provided data item (or one of its contained items) the association between the two are made.
When a data match has been made, this object is made an observer of the data object and if the NO_UPDATE keyword is not set, the OnDataChangeUpdate() method is called on this object.
If a type match is found, but the given parameter already has a data object associated with it, the type match will continue.
If a match cannot be found, a value of 0 is returned.
Syntax
Result = Obj->[IDLitParameter::]SetData(Data [, /BY_VALUE] [, /NO_UPDATE] [, PARAMETER_NAME=string] )
Return Value
Returns 1 if the IDLitData object was successfully matched with a parameter registered with the visualization object, or 0 otherwise.
Arguments
Data
An IDLitData object to be matched with a parameter registered with the visualization object.
Keywords
BY_VALUE
Set this keyword to cause Data to be copied and managed by the visualization's parameter interface. If this keyword is not set, the data object is managed by the iTool system, and can be altered by other iTools.
NO_UPDATE
Set this keyword to prevent the OnDataChangeUpdate method from being called when Data is associated with one of the visualization object's registered parameters. If this keyword is not set, the OnDataChangeUpdate method is called, providing the opportunity for subclasses of the visualization object to be notified that data associated with the parameter interface has changed.
PARAMETER_NAME
Set this keyword to a scalar string containing the name of the registered parameter with which Data should be associated. If the iTool data type of the data contained in Data does not match one of the data types supported by the specified registered parameter, Data will not be associated with the registered parameter and this function will return zero.
Version History