ITT Rule IDL Version 7.0 User Manual Page 385

  • Download
  • Add to my manuals
  • Print
  • Page
    / 430
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 384
Appendix A: Controlling iTools from the IDL Command Line 385
iTool Developer’s Guide Retrieving Property Information
Retrieving Property Information
While it is possible to execute an iTool operation with just the operation’s component
identifier (as described in “Running Operations” on page 391), in many cases you
will want to modify the operation’s properties before execution. In other cases you
may not wish to execute an operation at all — you may only be interested in changing
the value of one or more properties of a given component object. Modifying the
properties of an iTool component (as described in “Changing Property Values on
page 389) requires that you know the property identifier of the component object
property you wish to change.
Retrieving Property Identifiers
Once you have retrieved the component identifier string for an iTool component (as
described in “Retrieving Component Identifiers” on page 382), you can use the
component identifier to retrieve the property identifiers for properties of that
component. For example, the following statements create an iPlot tool containing
some random data, retrieve the component object identifier for the Smooth operation,
and print the property identifiers:
IPLOT, RANDOMU(seed, 15)
idTool = ITGETCURRENT(TOOL=oTool)
idSmooth= oTool->FindIdentifiers('*smooth*', /OPERATIONS)
objSmooth = oTool->GetByIdentifier(idSmooth)
propsSmooth = objSmooth->QueryProperty()
PRINT, propsSmooth
IDL prints:
NAME DESCRIPTION TYPES SHOW_EXECUTION_UI WIDTH
The strings displayed are the property identifiers for the Smooth operation.
Note that after we have retrieved the full identifier for the Smooth operation, we use
the identifier as the argument to the GetByIdentifier method of the IDLitContainer
class. The GetByIdentifier method returns the object reference to the Smooth
operation; we need the object reference in order to then call the QueryProperty
method, which returns a string array containing the property identifiers.
See “IDLitComponent::QueryProperty” and “IDLitContainer::GetByIdentifier” (IDL
Reference Guide) for additional details on these methods.
Page view 384
1 2 ... 380 381 382 383 384 385 386 387 388 389 390 ... 429 430

Comments to this Manuals

No comments