ITT Rule IDL Version 7.0 Manuel d'utilisateur Page 393

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 430
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 392
Appendix A: Controlling iTools from the IDL Command Line 393
iTool Developer’s Guide Selecting Items in the iTool
Selecting Items in the iTool
When you execute an operation in an iTool, the operation will be applied to the
currently selected item. You can use the Select method of the IDLitVisualization
class to ensure that the correct item is selected.
To select an item, do the following:
1. Find the object’s full identifier as described in “Retrieving Component
Identifiers” on page 382. Note that only visualizations and annotations can be
selected.
2. Get an object reference to the object using the GetByIdentifier method of the
IDLitContainer class.
3. Call the Select method.
Example: Selecting an Item Programmatically
For example, suppose you create an iPlot tool with two plot lines, using the following
statements:
IPLOT, RANDOMU(seed, 15)*FINDGEN(15)
IPLOT, FINDGEN(15), /OVERPLOT
After these statements have been executed, the second (straight) plot line will be
selected in the tool. To select the first plot line, you would use the following
statements:
idTool = ITGETCURRENT(TOOL=oTool)
plotIDs = oTool->FindIdentifiers('*plot*', /VISUALIZATIONS)
plotObj0 = oTool->GetByIdentifier(plotIDs[0])
plotObj0->Select
To apply the smooth operation to the first plot line (which has now been
programmatically selected), setting the value of the SHOW_EXECUTION_UI
property to 0 (False), you would use the following statements:
idSmooth = oTool->FindIdentifiers('*smooth', /OPERATIONS)
success = oTool->DoSetProperty(idSmooth, 'SHOW_EXECUTION_UI', 0)
success = oTool->DoAction(idSmooth)
Vue de la page 392
1 2 ... 388 389 390 391 392 393 394 395 396 397 398 ... 429 430

Commentaires sur ces manuels

Pas de commentaire