Results

<< Click to Display Table of Contents >>

Navigation:  Concepts >

Results

XML Result data

Result template:

<cadsofttools version="2.0">
<Results errors="Number of errors"/>
<Result instruction= “Name of instruction or event”  type=”instruction|event” >
 <!--  Each instruction has its Result. If Result exists, then instruction was processed.
 If there is no <Error> for the instruction, then it was successful without errors.
-->
   <Output>
     <!-- Output - compulsory parameter which stores Output data for instruction if any. -->
   </ Output >    
   <Errors>
     <!-- Errors - compulsory parameter which consists of errors if any. -->      
     <Error message=””>
       <!-- Information about a certain error. -->        
   </Error>      
   </Errors>
</Result>
</Results>
</cadsofttools>

 

Example:

1. Run XML IDE.

2. Click Execute XML for Add.xml (it is set by default).

Select Events > SignToOnSelectEntity.xml and click Execute XML:

clip0072

 

Input XML:

<?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>  

 
Output XML:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<cadsofttools version="2.0">
 <Results>
   <Result Instruction="signtoevent"/>
 </Results>
</cadsofttools>    

 

In this case, we see only one Result which has the instruction name without the <Output> or <Errors> nodes.

 

3. Go to the CADEditorX form and either click the "CADSoftTools" text or select any other entity.

clip0073

 

In XML IDE, we will see the following Result:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<cadsofttools version="2.0">
 <Results>
   <Result Instruction="OnSelectEntity" Type="event" guid="{AED1356D-6800-443D-8725-332FD5D4D199}">
     <Output SelectedCount="1">
       <selected handle="$22"/>
     </Output>
   </Result>
 </Results>
</cadsofttools>  

 

Now in the Result section we see the Output node with the attribute "SelectedCount" which defines the number of the selected entities. In API reference, you can find information on each instruction or attribute.

Go to CADEditorX