Executing a User Interface Service

Once you have defined and registered a user interface service and created any supporting user interface code, you can call the service from any iTool operation simply by calling the DoUIService method of the IDLitTool class.

In most cases, the DoUIService method is called from the DoExecuteUI or DoAction method of an IDLitOperation or an IDLitDataOperation. For example, the following lines call the RotateByAngle user interface service:

   oTool = self->GetTool() 
   IF (oTool EQ OBJ_NEW()) THEN RETURN, 0 
 
   RETURN, oTool->DoUIService('RotateByAngle', self) 

The GetTool method is part of the IDLitIMessaging class, which is a superclass of all iTool operation classes; it returns an object reference to the current iTool. This method calls the RotateByAngle user interface service with the operation itself as the currently selected object, which allows the UI service to modify the operation's properties. The second argument to the DoUIService method is an object reference that can be used by the service to modify the object's properties.