ITT Rule IDL Version 7.0 User Manual Page 387

  • Download
  • Add to my manuals
  • Print
  • Page
    / 430
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 386
Appendix A: Controlling iTools from the IDL Command Line 387
iTool Developer’s Guide Retrieving Property Information
IF success THEN PRINT, 'Width is: ', width_value ELSE $
PRINT, 'No value returned'
IDL prints:
Width is: 3
The GetPropertyByIdentifier function method returns a value of 1 (one) if the
property value was retrieved successfully, or 0 (zero) otherwise. In the example, the
property value of 3 is successfully retrieved.
Note that you could also use the GetProperty method:
objSmooth->GetProperty, WIDTH=width_value
PRINT, 'Width is: ', width_value
While this is slightly simpler, it makes the error handling slightly trickier, and forces
you to hard-code the name of the property whose value you are retrieving.
See “IDLitComponent::GetPropertyByIdentifier” (IDL Reference Guide) for
additional information on retrieving property values.
An Example Property Information Retrieval Routine
An example utility routine named itpropertyreport.pro uses the methods
discussed in the previous sections to retrieve property information.
Example Code
The routine
itpropertyreport.pro is included in the
examples/doc/itools directory of the IDL distribution. Run the example
procedure by entering
itpropertyreport at the IDL command prompt or view
the file in an IDL Editor window by entering .EDIT itpropertyreport.pro.
Call
itpropertyreport.pro by specifying an iTool object reference and the full
object identifier (as returned by the FindIdentifiers method) of the component whose
properties you would like to inspect. For example, calling
itpropertyreport with
the iTool object reference and operation identifier used above:
itpropertyreport, oTool, idSmooth
produces the following output:
Properties of /TOOLS/PLOT TOOL/OPERATIONS/OPERATIONS/FILTER/SMOOTH
Identifier Name Type
---------- ---- ----
NAME Name STRING
DESCRIPTION Description STRING
TYPES TYPES USERDEF
Page view 386
1 2 ... 382 383 384 385 386 387 388 389 390 391 392 ... 429 430

Comments to this Manuals

No comments