How to catch events

<< Click to Display Table of Contents >>

Navigation:  How To >

How to catch events

The SignToEvent instruction signs to particular events to accept callbacks with XML data.

Example for the OnSelectEntity event:

<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2.0">
   <!-- Sign to OnSelectEntity event. Handle in result will be the last selected entity.
   All the selected entities can be accessed through calling "GetSelected" command, see GetSelected.xml -->
 <signtoevent Event="OnSelectEntity"/>
</cadsofttools>    

 

Run and select the entity by mouse. Result will be like:

<cadsofttools version="2.0">
 <selectEntities>
   <result handle="$26"/>
 </selectEntities>
</cadsofttools>    

 

Event examples are stored in the Events section that is marked at the left side:

clip0059

 

Result parameters are marked in the right bottom side of the screenshot.

Go to CADEditorX