A SERVICE OF

logo

390 Appendix A: Controlling iTools from the IDL Command Line
Changing Property Values iTool Developer’s Guide
Visualization Browser property sheet. Methods for finding property identifiers are
discussed in detail in “Retrieving Property Information” on page 385.
The third argument to the DoSetProperty method is the new value for the property.
Techniques for determining the data type and allowed values for a given property are
described in “Property Attribute Information” on page 386.
Finally, the CommitActions method of the IDLitTool class commits all pending
transactions to the undo-redo buffer and refreshes the current window. Note that the
property changes are not undoable until the changes have been committed with a call
to the CommitActions method.
Tip
You can do make several calls to the DoSetProperty method, followed by a single
call to the CommitActions method. This will bundle all of the SetProperty actions
into a single item in the undo-redo buffer.
Using the SetProperty Method
Use the SetProperty method of the component object class to change the value of a
property associated with an item in the iTool hierarchy. Using the SetProperty
method requires that you retrieve an object reference to the object whose properties
you are setting.
Note
If the property whose value you want to change is not registered, you must use the
SetProperty method rather than the DoSetProperty method.
For example, suppose you have created an iPlot tool with the following command:
IPLOT, RANDOMU(seed, 15)
To change the color of the plot line, you could use the following statements:
idTool = ITGETCURRENT(TOOL=oTool)
idPlot = oTool->FindIdentifiers('*plot', /VISUALIZATIONS)
oPlot = oTool->GetByIdentifier(idPlot)
oPlot->SetProperty,COLOR=[40,120,200]
oTool->RefreshCurrentWindow
Warning
Property changes made using the SetProperty method are not placed in the undo-
redo buffer.