How to catch events

  XML_API > CAD XML API Reference > How To >

How to catch events

Previous pageReturn to chapter overviewNext page

Instruction SignToEvent signs for particular events to accept callbacks with XML data.

 

Example for OnSelectEntity event:

<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
    <!-- 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 entity by mouse. Result will be like:

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

Event examples are situated in "Events" section which is marked at the left side:

 

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

Go to ABViewer