Description: Instruction ADD adds entities and Drawing Structure Data to the current drawing. There are many examples of adding particular classes with ADD instruction which are described in Classes examples.
Handle can be given directly via $ or indirectly via @ attributes, it also accepts a list of handles divided by the ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
Handle can be given directly via $ or indirectly via @ attributes, it also accepts a list of handles divided by the ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
Example:
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: Instruction ADD adds entities and Drawing Structure Data to the current drawing. There are many examples of adding particular classes with ADD instruction which are described in Classes examples. -->
<add>
<!-- The following line adds a text. -->
<cstText Text="CADSoftTools" Point="0.5, 0.5" Height="1"/>
<!-- The following line adds a line. -->
<cstLine point="0,0,0" Point1="10,0,0"/>
</add>
<FitToSize/>
</cadsofttools>
Example 2:
Description: The example shows how to add a complicated Drawing Structure Data to the current drawing.
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: The example shows how to add a complicated Drawing Structure Data to the current drawing. -->
<add>
<cstSectionTables Name="TABLES">
<SubEntities>
<cstTable Name="LAYER">
<SubEntities>
<cstLayer name="Layer2" Color="0;3;" />
<cstLayer name="Invisible" Visible="False" />
<cstLayer name="Locked" Locked="True" />
</SubEntities>
</cstTable>
</SubEntities>
</cstSectionTables>
<cstSectionBlocks Name="BLOCKS">
<SubEntities>
<cstBlock name="block1">
<SubEntities>
<cstLine point="0,0,0" point1="50,0,0" />
<cstText point="0,3,0" text="This is a block" height="3" />
</SubEntities>
</cstBlock>
</SubEntities>
</cstSectionBlocks>
<!-- Add entities Model -->
<cstInsert blockname="block1" point="0,50,0" layer="Layer2" />
<cstLine point="10,10,0" point1="20,30,0" Color="0;1;" HandleSave="@1" />
<cstCircle point="10,10,0" radius="20" HandleSave="@2" />
<cstText point="0,-20,0" text="Enghlish Русский Franzosisch Francais" height="3" />
<!-- Add to an existing block -->
<cstSectionBlocks Name="BLOCKS">
<SubEntities>
<cstBlock name="block1">
<SubEntities>
<cstLWPolyline>
<SubEntities>
<cstVertex point="10,10,0" />
<cstVertex point="10,40,0" />
<cstVertex point="40,40,0" />
</SubEntities>
</cstLWPolyline>
</SubEntities>
</cstBlock>
</SubEntities>
</cstSectionBlocks>
</add>
<fittosize />
<!-- To get the handle of the created entities, use the attribute HandleSave="@Index". -->
<!-- Then you'll be able to use it as an alias to the real Handle of the object. -->
<!-- To get the real Handle, use the command <get Handle="@Index"/> -->
<get Handle="@1" />
</cadsofttools>
Example 3:
Description: the example shows how to work with HandleSave
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: the example shows how to work with HandleSave -->
<add>
<cstText point="10,10,0" Text="HandleSave is @77" Height="3" HandleSave="@77" />
</add>
<!-- Handles alias @77 can be used for select and other instructions -->
<select Handle="@77" />
<apply Color="0;1;"/>
<FitToSize/>
<!-- Signs to OnSelectEntity event. Handle in result will be the last selected entity.
If you press the entity which is created in this example, the result will be its real Handle. -->
<signtoevent Event="OnSelectEntity"/>
</cadsofttools>
AppCommand
The Command instruction executes application
The returned value has the following structure:
Result parameters are:
Description: Instruction APPLY assigns new values to the entity attributes. The entity must be selected at first, by using Select Instruction, by mouse, etc.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Instruction APPLY assigns new values to the entity attributes. The entity must be selected at first, by using Select Instruction, by mouse, etc. -->
<!-- XML for adding a line to select by handle parameter -->
<add>
<cstLine point="0,0,0" Point1="10,0,0" Handlesave="@1" />
</add>
<Select Handle="@1"/>
<apply lineweight="2.00 MM" point1="50,10,0" Color="0;33;"/>
<!-- Zoom rect of the selected entities to the screen -->
<ShowSelectedEntities/>
<UnSelect Handle="@1"/>
</cadsofttools>
Example 2:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!--Description: Changing layer properties. -->
<!--Adds layers-->
<add>
<cstSectionTables Name="TABLES">
<SubEntities>
<cstTable Name="LAYER">
<SubEntities>
<cstLayer name="Layer1" Color="0;3;" />
<cstLayer name="Layer2"/>
</SubEntities>
</cstTable>
</SubEntities>
</cstSectionTables>
</add>
<!--Selection of layers for changing.
IMPORTANT! While selecting the objects that are not visible in the area Model it is necessary to state the parameter Marker="false"-->
<select PathName="TABLES;LAYER;Layer1" Marker="false"/>
<!--Assignation of new values to the properties of the selected layers. -->
<apply visible="false" Locked="true"/>
<!--Deselection of the selected layers.-->
<unselect PathName="TABLES;LAYER;Layer1" Marker="false"/>
</cadsofttools>
Example 3:
Description: Changing of the text style properties; setting of the current text style.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Changing of the text style properties; setting of the current text style. -->
<!--XML for adding a new text style -->
<add>
<cstSectionTables Name="TABLES">
<SubEntities>
<cstTable Name="STYLE">
<SubEntities>
<cstStyle Name="Arial bold" PrimaryFont="arialbd.ttf" FontName="Arial" FontStyle="2"/>
</SubEntities>
</cstTable>
</SubEntities>
</cstSectionTables>
</add>
<!--Selection of a text style according to its name and assignation of new values to the text style properties.
IMPORTANT! While selecting the objects that are not visible in the area Model it is necessary to state the parameter Marker="false" -->
<select PathName="TABLES;STYLE;Arial bold;" Marker="false"/>
<apply PrimaryFont="arialbi.ttf" FontStyle="3" FixedHeight="6"/>
<unselect PathName="TABLES;STYLE;Arial bold" Marker="false"/>
<!--Setting a new text style as the current one. -->
<command text="TextStyle "Arial bold""/>
</cadsofttools>
Example 4:
Description: Changing of the dimension style properties; setting the current dimension style.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Changing of the dimension style properties; setting the current dimension style. -->
<!-- ArrowType = DimRBlk:
0 = _CLOSEDFILLED; 1 =_CLOSEDBLANK; 2 = _CLOSED; 3 = _DOT; 4 = _ARCHTICK; 5 = _OBLIQUE; 6 = _OPEN; 7 = _ORIGIN;
8 = _ORIGIN2; 9 = _OPEN90; 10 = _OPEN30; 11 = _DOTSMALL; 12 = _DOTBLANK; 13 = _SMALL; 14 = _BOXBLANK; 15 = _BOXFILLED;
16 = _DATUMBLANK; 17 = _DATUMFILLED; 18 = _INTEGRAL; 20 = _NONE.-->
<add>
<cstSectionTables Name="TABLES">
<SubEntities>
<cstTable Name="DIMSTYLE">
<SubEntities>
<cstDimensionStyle Name="CADSoftTools" DimTxt="3.5" DimBlk="_OBLIQUE" DimBlk1="_OBLIQUE" DimBlk2="_OBLIQUE" DimAsz="2.5"/>
</SubEntities>
</cstTable>
</SubEntities>
</cstSectionTables>
</add>
<!--Selection of a dimension style according to its name and assignation of new values to the dimension style properties.
IMPORTANT! While selecting the objects that are not visible in the area Model it is necessary to state the parameter Marker="false" -->
<!-- DimSah is a switch which manages styles of dimensional arrows.
"True" allows changing the style of the both arrows with the help of DIMBLK.
"False" allows changing the style of separate arrows with the help of DIMBLK1 and DIMBLK2. -->
<select PathName="TABLES;DIMSTYLE;STANDARD;" Marker="false"/>
<apply DimBlk="_DOTBLANK" DimSah="True" DimBlk1="_ARCHTICK" DimBlk2="_OBLIQUE" DimAsz="0.25" DimTxt="0.3"/>
<unselect PathName="TABLES;DIMSTYLE;STANDARD" Marker="false"/>
<!--Setting the dimension style as the current one. -->
<command text="DimStyle "CADSoftTools""/>
</cadsofttools>
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Takes a screenshot and turns it into a Base64 string. -->
<capturescreen/>
</cadsofttools>
command
Description: Instruction Command executes Command line with parameters described in Text attribute. Commands are described in the user manual, also there are many command examples provided in "Commands" section.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Instruction Command executes Command line with parameters described in Text attribute. Commands are described in the user manual, also there are many command examples provided in "Commands" section. -->
<!-- Executes "Line" command, i.e. starts to draw a line with the mouse: -->
<command text="line"/>
</cadsofttools>
ContextMenu
Description: Context menu instruction allows to replace the context menu by a new one or to add new menu items to the top or to the end of the current menu.
When the user clicks on a menu item, its caption returns as event <MenuItemClick caption=" "/>
Sender and onClick parameters of theItem are optional. They should be direct addresses to Sender object and onPopup event pointers in a parent application.
Any object's attribute that has no read-only modifiers can be used as a parameter
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Context menu instruction allows to replace the context menu by a new one or to add new menu items to the top or to the end of the current menu.
When the user clicks on a menu item, its caption returns as event <MenuItemClick caption=" "/>
Sender and onClick parameters of theItem are optional. They should be direct addresses to Sender object and onPopup event pointers in a parent application. -->
<!-- mode: 0 - replace, 1 - to bottom, 2: to top -->
<contextmenu mode="2">
<items>
<item caption="Menu Item 1"/>
<item caption="Menu Item 2" Sender="$00000000" />
<item caption="Menu Item 3" Sender="$00000000" onClick="$00000000"/>
<item caption="Menu Item 4" Sender="$00000000" onClick="$00000000" onPopup="$00000000"/>
</items>
</contextmenu>
</cadsofttools>
CreateBTIEntity
Create BTI entities
The returned value has the following structure:
Result parameters are:
Description: Instruction CREATEHATCH creates Hatch using selecte entities as countours.
Please select entity by mouse or by xml Instruction SELECT before calling this Instruction.
Handle can be given directly via $ or indirectly via @ attributes, it also accepts a list of handles divided by the ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
Example:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Description: Instruction CREATEHATCH creates Hatch using selecte entities as countours.
Please select entity by mouse or by xml Instruction SELECT before calling this Instruction.-->
<!-- Syntax:
<createhatch Hatchname="" Angle="" PatternScale="" Color=""/>
Attributes:
Hatchname - string - name of Hatch, default is "SOLID" which creates a solid hatch.
Other names: "Box", "Escher" and others can be found in Hatch dialog in user interface.
Angle - Double - rotation angle of hatch
PatternScale - Double - scale of hatch's pattern
Color - sring CADSoftTools color structure - color as index or RGB
-->
<cadsofttools version="2">
<!-- Create simple rectangular Solid Hatch. Handle of polyline is saved as "@1" -->
<add>
<cstLWPolyline HandleSave="@1">
<SubEntities>
<cstVertex Point="140,100,0"/>
<cstVertex Point="141,100,0"/>
<cstVertex Point="141,103,0"/>
<cstVertex Point="140,103,0"/>
</SubEntities>
</cstLWPolyline>
</add>
<!-- Select polyline -->
<Select Handle="@1"/>
<!-- Create hatch -->
<createhatch/>
<UnSelect Handle="@1"/>
<!-- Create polyline for Hatch, -->
<add>
<cstLWPolyline HandleSave="@2">
<SubEntities>
<cstVertex Point="141,109,0"/>
<cstVertex Point="142,112,0"/>
<cstVertex Point="143,109,0"/>
<cstVertex Point="147,109,0"/>
<cstVertex Point="144,107,0"/>
<cstVertex Point="145,105,0"/>
<cstVertex Point="142,107,0"/>
<cstVertex Point="141,105,0"/>
<cstVertex Point="141,107,0"/>
<cstVertex Point="138,108,0"/>
<cstVertex Point="141,109,0"/>
</SubEntities>
</cstLWPolyline>
</add>
<!-- Select polyline -->
<Select Handle="@2"/>
<!-- Create hatch -->
<createhatch hatchname="BOX" Angle="30" PatternScale="0.1" Color="0;34;"/>
<UnSelect Handle="@2"/>
<!-- Create and select some countours for creating hatch. -->
<add>
<cstLine point="120,120,0" point1="130,130,0" Color="0;3;" HandleSave="@3"/>
<cstLine point="120,120,0" point1="130,110,0" Color="0;3;" HandleSave="@4"/>
<cstLine point="130,110,0" point1="130,130,0" Color="0;3;" HandleSave="@5"/>
<cstCircle point="100,100,0" radius="10" Color="0;3;" HandleSave="@6"/>
</add>
<!-- Select contours -->
<Select Handle="@3;@4;@5;@6;"/>
<createhatch hatchname="SOLID" Color="0;3;"/>
<UnSelect/>
<fittosize/>
</cadsofttools>
CustomSelectMode
The CUSTOMSELECTMODE instruction allows defining custom selections and turning on the read-only mode with a possibility to select certain entities.
Handle can be given directly via $ or indirectly via @ attributes, it also accepts a list of handles divided by the ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<add>
<cstLine Point="0,0" Point1="10,5" HandleSave="@1"/>
<cstText Point="2,3" Text="Example text" Height="0.5" HandleSave="@2"/>
<cstLine Point="0,-3" Point1="10,2" HandleSave="@3"/>
</add>
<!--Changes the color and the line weight of the object selection for all the drawings.-->
<CustomSelectMode CustomDraw="True" Color="0;33;" LineWeight="3" />
<!-- Changes the color and the line weight of the object selection for the object with Handle=@3
and displays a confirmation dialog when deleting it. -->
<CustomSelectMode ReadOnly="False" AskOnDelete="True" CustomDraw="True" Color="0;5;" LineWeight="2" Handle="@3"/>
<!-- The object with Handle="@2" is read only; it cannot be deleted. -->
<CustomSelectMode ReadOnly="True" Handle="@1"/>
<fittosize/>
</cadsofttools>
delete
The DELETE instruction deletes the selected entities.
The returned value has the following structure:
Result parameters are:
Property of the ShowSelectEntities instruction, the type of the precision calculation. Possible parameters are (0: Proportional, 1: Absolute, 2: FitToSize)
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<add>
<cstLWPolyline>
<SubEntities>
<cstVertex Point="0,0"/>
<cstVertex Point="10,0"/>
<cstVertex Point="10,5"/>
<cstVertex Point="0,5"/>
<cstVertex Point="0,0"/>
</SubEntities>
</cstLWPolyline>
</add>
<!-- The editor is switched to the ReadOnly mode, modifying of objects is turned off for the current drawing,
but it is possible to add new elements. -->
<Editor ReadOnly="True"/>
<fittosize/>
</cadsofttools>
Example 2:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<add>
<cstLWPolyline HandleSave="@1">
<SubEntities>
<cstVertex Point="0,0"/>
<cstVertex Point="10,0"/>
<cstVertex Point="10,10"/>
<cstVertex Point="0,10"/>
<cstVertex Point="0,0"/>
</SubEntities>
</cstLWPolyline>
<cstLine Point="-5,3" Point1="2,7" HandleSave="@2"/>
</add>
<!-- The Editor instruction specifies global settings for the ShowSelectedEntities instruction.
The ShowEntityMethod parameter can have the following values:
0- offset is specified in percents from the size of the selected object;
1- offset is specified in pixels;
2- there is no offset. -->
<!-- In this example, the offset is defined as 10 pixels from the working area in the ShowSelectedEntities instruction,
then the object with Handle="@2" is selected and is fitted to the working area with the help
of the ShowSelectedEntities instruction with the margins set. -->
<Editor ReadOnly="False" ShowEntityMethod="1" ShowEntityPrecision="20"/>
<Select Handle="@2"/>
<ShowSelectedEntities/>
<UnSelect Handle="@2"/>
</cadsofttools>
FindText
Find text entities
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: The instruction FITTOSIZE fits the drawing to the view area proportionally. -->
<fittosize/>
</cadsofttools>
get
Description: Instruction GET returns the full structure of the drawing if no parameters are given as a result.
If handle parameter is provided, the instruction returns properties of the entity specified by this handle.
Handle can be given directly via $ or indirectly via @ attributes, it also accepts a list of handles divided by the ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
A set of symbols showing the location of the named sections or objects in the Converter name space (which is similar to the DXF structure). As a separator the sign ";" is used.
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Instruction GET returns the full structure of the drawing if no parameters are given as a result.
If handle parameter is provided, the instruction returns properties of the entity specified by this handle. -->
<get/>
</cadsofttools>
Example 2:
Description: This example adds an entity and gets its parameters.
HandleSave="@1" and Handle="@1" are used for handling of the entity.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: This example adds an entity and gets its parameters.
HandleSave="@1" and Handle="@1" are used for handling of the entity. -->
<add>
<cstLine point="10,10,0" point1="20,30,0" Color="0;1;" HandleSave="@1" />
</add>
<get Handle="@1"/>
</cadsofttools>
Example 3:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- PathName allows to get access to the object according to its path in the Converter name space -->
<!-- Example: "TABLES;LAYER" "TABLES;STYLE;STANDARD" -->
<get PathName="TABLES;LAYER"/>
</cadsofttools>
Example 4:
Description: use of the filter in the instruction GET.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: use of the filter in the instruction GET. -->
<!-- Getting of the red lines and the green circles situated in the layer called “Layer1”. -->
<get Layer="Layer1">
<cstLine Color="0;1;"/>
<cstCircle Color="0;3;"/>
</get>
<!-- Getting of all block references of the drawing. -->
<get>
<cstInsert/>
</get>
<!-- Getting a list of invisible layers. -->
<get PathName="TABLES;LAYER;" Visible="false"/>
</cadsofttools>
getbox
Returns the 3D box that encloses the selected entities.
Handle can be given directly via $ or indirectly via @ attributes, it also accepts a list of handles divided by the ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
A set of symbols showing the location of the named sections or objects in the Converter name space (which is similar to the DXF structure). As a separator the sign ";" is used.
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Converts screen coordinates into the CAD coordinate system. The origin of screen coordinates is located in the top left corner of the display area. -->
<getcadcoords Point="10,10"/>
<getcadcoords Point="10,10" Mode="ScreenToCad"/>
<!-- Converts CAD coordinates to the screen coordinate system. The origin of screen coordinates is located in the top left corner of the display area. -->
<getcadcoords Point="0.050,2.076" Mode="CadToScreen"/>
</cadsofttools>
GetData
Gets the data located by the definition of "Name"
The returned value has the following structure:
Result parameters are:
Description: GETDRAWINGCHANGED instruction checks if any changes have been made in a Drawing. The result parameter CHANGED returns True if any changes have been implemeted in a Drawing.
The returned value has the following structure:
Result parameters are:
CHANGED returns True if any changes were implemented in a Drawing.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: GETDRAWINGCHANGED instruction checks if any changes have been made in a Drawing. The result parameter CHANGED returns True if any changes have been implemeted in a Drawing. -->
<getdrawingchanged/>
</cadsofttools>
getdrawingslist
Returns guids for all opened drawings.
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Returns picture of the current view in Base64 encoding. -->
<getimage>
<ExportParams FileName = "C:\Users\Username\Documents\CADEditorX 15\Drawings\Image" Format=".png"><!-- attribute 'FileName' calls additional saving to file -->
<Width>1024</Width><!--always needs setup -->
<Height>768</Height><!--always needs setup -->
<Proportional>True</Proportional>
<BitPerPixel>24</BitPerPixel>
<MeasureInPixels>True</MeasureInPixels>
<Transparent>True</Transparent>
<BackgroundColor>$FFFFFF</BackgroundColor><!--default value white -->
<DefaultColor>$000000</DefaultColor><!--default value black -->
<ClipMode>4</ClipMode>
<ClipRect>0,0,0,2048,1536,0</ClipRect>
<LayoutNameExportMode>Layout Bud2</LayoutNameExportMode><!--default current layout. The first char '@' of this name is layout index -->
</ExportParams>
</getimage>
</cadsofttools>
GetSaveHandles
Get Saved handles
The returned value has the following structure:
Result parameters are:
Handle can be given directly via $ or indirectly via @ attributes, it also accepts a list of handles divided by the ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Instruction GETSELECTED returns handles of the selected entities. -->
<getselected/>
</cadsofttools>
GetView
The GETVIEW instruction asks current view area as cstVport data. Use with SETVIEW instruction.
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Asks current view area as cstVport data. Use with SETVIEW instruction.-->
<getview/>
</cadsofttools>
getviewrect
Unsupported
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Asks current view area as a rectangle. Use with SETVIEWRECT instruction.-->
<getviewrect/>
</cadsofttools>
GlobalVariable
Get global variable
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!--Invalidates the current layout or area specified by the Box attribute.-->
<Invalidate/>
<Invalidate Box="10,10,0,1,1,0"/>
</cadsofttools>
Iterator
Iterate drawing entities
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- The Iterator Instruction* executes** XML content*** for the selected entities and iterates the block content. Use a standard filter like the one of the get or the select command
Mode:
bit 0: Iterates the content of a block;
bit 1: Executes XML for the owner entity;
-->
<Iterator Mode="2">
<apply Color="1;65535"/>
</Iterator>
</cadsofttools>
load
The LOAD instruction loads a file from the HDD or from a URL.
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- The function extracts attributes of objects on the entire floor from the provided DXF file into a resulting XML file. -->
<Report Name="ExtractFloorPlanXML" FileName="C:\ReportsXML.xml"/>
<!-- The function extracts an image (in PNG or PDF format) of the entire floor plan from the provided DXF file -->
<Report Name="ExtractFloorPlanImage" >
<ExportParams FileName="C:\ImagePNG" Format=".png">
<Width>1024</Width>
<Height>-1</Height>
<Proportional>True</Proportional>
<BitPerPixel>24</BitPerPixel>
<MeasureInPixels>True</MeasureInPixels>
</ExportParams>
</Report>
<!-- The function extracts an image of the provided object from the DXF file (in PNG or PDF format). -->
<Report Name="ExtractObjectImage" Layer="Layer1" ObjectId="12547367.3.003" CADBuffer="2">
<ExportParams FileName="C:\ImagePDF" Format=".png">
<Width>1024</Width>
<Height>-1</Height>
<Proportional>True</Proportional>
<BitPerPixel>24</BitPerPixel>
<MeasureInPixels>True</MeasureInPixels>
</ExportParams>
</Report>
</cadsofttools>
ribbon
Defines the ribbon visibility. Use the instruction with the on/off switch.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Saves using XML export parametrs -->
<!-- Saves as a raster image-->
<save>
<ExportParams FileName="C:\Users\Username\Documents\CADEditorX 15\Drawings\ImageJPG" Format=".jpg">
<Width>1024</Width>
<Height>-1</Height>
<Proportional>True</Proportional>
<BitPerPixel>24</BitPerPixel>
<!-- Set quality in percent for JPG -->
<Quality>100</Quality>
<MeasureInPixels>True</MeasureInPixels>
<!-- Set transparent for GIF -->
<Transparent>False</Transparent>
<!-- Set dpi for JPG: always 2 parameters -->
<DPUX>96</DPUX>
<DPUY>96</DPUY>
<!-- Compression for TIFF: LZW, Deflate, JPEG, CCITT3, CCITT4, CCITT6, Rle, Auto, None -->
<Compression>LZW</Compression>
</ExportParams>
</save>
<!-- Saves as PDF-->
<save>
<ExportParams FileName="C:\Users\Username\Documents\CADEditorX 15\Drawings\ImagePDF" Format=".pdf">
<!-- Page size is set in the following ways:
a) by specifying a standard <PageSize> (e.g. A4)
b) by specifying <PageWidth> and <PageHeight>
c) by using plot settings <UseExtentsFromPlotSettings>
d) by calculating the overall dimensions <SizeAsExtents> of the drawing taking
into account the scale factor <MMInCad> -->
<PageSize>A4</PageSize>
<Orientation>1</Orientation><!-- 0: landscape; 1: portrait -->
<Margin>5</Margin><!-- page margins in millimeters -->
<Author>Author</Author>
<DrawMode>0</DrawMode><!-- 0: Color; 1: Custom Color; -->
<BackgroundColor>$000000</BackgroundColor>
<DefaultColor>$0000FF</DefaultColor>
<UseHighQuality>True</UseHighQuality><!-- Set value quality - lowest quality: 0.5, highest quality: 0.01 -->
<!-- Select layouts for export: 0: Model; 1:AllPaperSpaces; 2:LayoutByName; 3:AllLayouts+Model; 4:CurrentLayout; -->
<LayoutExportMode>2</LayoutExportMode>
<!-- Used if layouts export mode is 'LayoutByName' -->
<LayoutNameExportMode>Model</LayoutNameExportMode>
<NullWidth>0.3</NullWidth>
<SaveLineWeight>True</SaveLineWeight>
<LineWeightScale>1</LineWeightScale>
</ExportParams>
</save>
<!-- Saves as PNG -->
<save>
<ExportParams FileName="C:\Users\Username\Documents\CADEditorX 15\Drawings\ImagePNG" Format=".png">
<Width>1024</Width>
<Height>-1</Height>
<Proportional>True</Proportional>
<BitPerPixel>24</BitPerPixel>
<MeasureInPixels>True</MeasureInPixels>
</ExportParams>
</save>
<!-- When saving to DXF and DWG, the format version is inidicated in the Version parameter in the following way:
AC1015 = AutoCAD2000;
AC1018 = AutoCAD2004;
AC1021 = AutoCAD2007; -->
<!-- Saves as DXF -->
<save>
<ExportParams FileName="C:\Users\Username\Documents\CADEditorX 15\Drawings\ImageDXF" Format=".dxf">
<Version>AutoCAD2004</Version>
<IsConvertImageToOLE>True</IsConvertImageToOLE>
</ExportParams>
</save>
<!-- Saves as DWG -->
<save>
<ExportParams FileName="C:\Users\Username\Documents\CADEditorX 15\Drawings\ImageDWG" Format=".dwg">
<Version>AutoCAD2000</Version>
<IsConvertImageToOLE>True</IsConvertImageToOLE>
</ExportParams>
</save>
<!-- Saves as GCode -->
<save>
<ExportParams FileName="C:\Users\Username\Documents\CADEditorX 15\Drawings\ImageGCode" Format=".nc">
<!--MachineType:
0: milling machine;
1: cutting machine; -->
<MachineTypeID>0</MachineTypeID>
<!--PassesDirectionID:
0:
1: -->
<PassesDirectionID>0</PassesDirectionID>
<Precision>2</Precision>
<FeedOnZ>2000</FeedOnZ>
<FeedMillOnXY>100</FeedMillOnXY>
<FeedCutOnXY>0</FeedCutOnXY>
<SpindleSpeed>2000</SpindleSpeed>
<DepthOnZ>-2</DepthOnZ>
<DepthPass>2</DepthPass>
<NumbOfPasses>1</NumbOfPasses>
<DepartureOnZ>5</DepartureOnZ>
<!--WorkpieceZeroPointID:
0: origin;
1: top left;
2: top right;
3: bottom left;
4: bottom right; -->
<WorkpieceZeroPointID>0</WorkpieceZeroPointID>
<ZeroPointOffset>50,10</ZeroPointOffset>
<LaserOnCommand>M3</LaserOnCommand>
<LaserOffCommand>M5</LaserOffCommand>
<UseLaserPower>False</UseLaserPower>
<LaserPower>128</LaserPower>
<Delay>500</Delay>
<!--UnitsID:
0: Millimetre;
1: Centimetre;
2: Metre;
3: Inch; -->
<MachineUnitsID>0</MachineUnitsID>
<DrawingUnitsID>0</DrawingUnitsID>
<AddLabelOfProgam>False</AddLabelOfProgam>
<LabelOfProgram>001</LabelOfProgram>
<AddNumbering>False</AddNumbering>
<ShowComments>True</ShowComments>
<ShowPercent>True</ShowPercent>
<StartNumber>5</StartNumber>
<StepOfNumbering>5</StepOfNumbering>
</ExportParams>
</save>
</cadsofttools>
Example 2:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!--Description: the example shows how to save several CAD files in one multipage PDF -->
<save>
<ExportParams FileName="C:\Users\Username\Documents\CADEditorX 15\Drawings\MultipagePDF" Format=".pdf">
<!-- Parameters for all files-->
<Margin>5</Margin><!-- page margins in millimeters -->
<Author>Author</Author>
<DrawMode>0</DrawMode><!-- 0: Color; 1: Black&White; -->
<Quality>0.01</Quality><!-- Value in range 0.5-0.01; 0.5: lowest quality; 0.01: highest quality; -->
<!-- Select layouts for export: 0: Model; 1:AllPaperSpaces; 2:LayoutByName; 3:AllLayouts+Model; 4:CurrentLayout; -->
<LayoutExportMode>3</LayoutExportMode>
<LayoutNameExportMode>Model</LayoutNameExportMode><!-- Used if layouts export mode is 'LayoutByName' -->
<sources>
<item FileName="C:\Users\Username\Documents\CADEditorX 15\Samples\Gasket.dwg"/>
<item FileName="C:\Users\Username\Documents\CADEditorX 15\Samples\3DLamborgini.dwg">
<!--Parameters for the second CAD file -->
<PageWidth>1024</PageWidth><!-- page width in millimeters -->
<PageHeight>512</PageHeight><!-- page height in millimeters -->
</item>
<item FileName="C:\Users\Username\Documents\CADEditorX 15\Samples\Entities.dxf">
<!--Parameters for the third CAD file -->
<PageWidth>210</PageWidth><!-- page width in millimeters -->
<PageHeight>297</PageHeight><!-- page height in millimeters -->
</item>
</sources>
</ExportParams>
</save>
</cadsofttools>
select
Description: Instruction SELECT selects entity(ies) by its handle(s).
Handle can be given directly via $ or indirectly via @ attributes, it also accepts a list of handles divided by the ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
A set of symbols showing the location of the named sections or objects in the Converter name space (which is similar to the DXF structure). As a separator the sign ";" is used.
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: Instruction SELECT selects entity(ies) by its handle(s). -->
<add>
<cstText Point="-18, 0, 0" Height="1" Text="Text marker is visible while Ellipse markers is not shown." HandleSave="@1"/>
<cstEllipse Point="0,0,0" RadPt="20,0,0" Ratio="0.5" StartAngle="0" EndAngle="360" HandleSave="@2"/>
</add>
<FitToSize/>
<!-- The following selects Text (@1) and ellipse (@2) but the marker is shown only for text. -->
<!-- After selecting an object with the help of Select instruction and fulfilling the needed operations,
please, deselect this object as it remains selected. -->
<!-- Mode - this mode is used if the Marker attribute is "True":
0 - set entities
1 - remove from the selected entities
2 - add to the selected entities -->
<select Handle="@1" Marker="True" Mode="0"/>
<select Handle="@2" Marker="False"/>
<!-- Changes color for both selected entities -->
<apply Color="0;1"/>
</cadsofttools>
Example 2:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<add>
<cstSectionTables Name="TABLES">
<SubEntities>
<cstTable Name="LAYER">
<SubEntities>
<cstLayer name="Layer2" HandleSave="@1"/>
<cstLayer name="Layer3" HandleSave="@2"/>
</SubEntities>
</cstTable>
</SubEntities>
</cstSectionTables>
<cstLine Point="0,0" Point1="10,10" Layer="Layer2"/>
<cstLine Point="0,5" Point1="10,15" Layer="Layer3"/>
</add>
<!-- To edit objects that cannot be selected in the editor window set the variable Marker="False". -->
<!-- After selecting an object with the help of Select instruction and fulfilling the needed operations,
please, deselect this object as it remains selected. -->
<!-- Here are two ways of selecting objects:
1) by specifying the object's Handle (@1)
2) by specifying the section in the file and the object name. -->
<Select Handle="@1" Marker="False"/>
<apply lineweight="0.5" Color="0;1;"/>
<UnSelect Handle="@1" Marker="False"/>
<Select PathName="STYLE;STANDARD" Marker="False"/>
<apply WidthFactor="0.75" PrimaryFont="txt.shx"/>
<UnSelect PathName="STYLE;STANDARD" Marker="False"/>
<FitToSize/>
</cadsofttools>
Handle can be given directly via $ or indirectly via @ attributes, it also accepts a list of handles divided by the ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Changes the color and lineweight for the insert -->
<SetCustomInsert Handle="@1" Color="0;3;" LineWeight="3"/>
</cadsofttools>
SetData
Sets the data located by the definition of "Name"
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<getdrawingchanged/>
<!-- Set true or false value depending on changes were applied to the drawing by guid or Mode. -->
<setdrawingchanged Mode="1" changed="false"/>
<getdrawingchanged/>
</cadsofttools>
SetView
The SETVIEW instruction zooms the display area to given cstVport data. Use with GETVIEW instruction.
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!--Zooms the display area to a given rectangle. Use with GETVIEWRECT instruction.-->
<setviewrect Rect="1,2.55227261471941,0,6.0130718954248,-1.04249862711065,0"/>
</cadsofttools>
showselectedentities
The SHOWSELECTEDENTITIES instruction zooms view to show the selected entities. Parameters are set in the Editor Instruction.
Property of the ShowSelectEntities instruction, the type of the precision calculation. Possible parameters are (0: Proportional, 1: Absolute, 2: FitToSize)
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Instruction SHOWSELECTEDENTITIES zooms view to show selected entities. Please select any entities with the mouse or with the help of SELECT instruction before executing SHOWSELECTEDENTITIES. -->
<ShowSelectedEntities/>
</cadsofttools>
signtoevent
Description: Instruction SignToEvent signs for particular events to accept callbacks with XML data.
Handle can be given directly via $ or indirectly via @ attributes, it also accepts a list of handles divided by the ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
A set of symbols showing the location of the named sections or objects in the Converter name space (which is similar to the DXF structure). As a separator the sign ";" is used.
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Please run "add.xml" and Select all (Ctrl+A) entities. Then run 'getSelected.xml' and add unselect Handle="HANDLE" for each Handle. After that, run this xml. -->
<unselect Handle="HANDLE"/>
</cadsofttools>
WaterMark
Set or get watermark. Mode = 0 is "get". Mode = 1 is "set"
The returned value has the following structure:
Result parameters are:
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Mode="0" is default. If Mode="0" then watermark parameters are gotten , if "1", watermark parameters are set -->
<Watermark Mode="1">
<!-- if the Scale is set, then Scale apply by axis X -->
<!-- Aling:
"0" - Center - for default
"1" - TopLeft
"2" - BottomLeft
"3" - TopRight
"4" - BottomRight -->
<Parameters Angle="45" FontName="Arial" Color="$00FF00" Scale="1" Align="0"/>
<Text Value="WaterMark"/>
</Watermark>
</cadsofttools>
Handle can be given directly via $ or indirectly via @ attributes, it also accepts a list of handles divided by the ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
A set of symbols showing the location of the named sections or objects in the Converter name space (which is similar to the DXF structure). As a separator the sign ";" is used.
Property of the ShowSelectEntities instruction, the type of the precision calculation. Possible parameters are (0: Proportional, 1: Absolute, 2: FitToSize)
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: An arc is specified by a Point, a Radius, Start and End angles. -->
<add>
<cstArc Point="0,0,0" StartAngle="0" EndAngle="180" Radius="1"/>
</add>
<fittosize />
</cadsofttools>
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: An attribute definition is specified by a Point and a Height. The Tag and Value parameters are optional. -->
<add>
<cstAttdef Point="4.5,3" Height="3.5" Tag="Attribute tag" AttValue="" />
</add>
<fittosize />
</cadsofttools>
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: A circle is specified by a Point and a Radius. -->
<add>
<cstCircle point="0,0,0" Radius="10"/>
</add>
<fittosize />
</cadsofttools>
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Sets the fraction format when the DimLUnit system variable is specified as 4 (Architectural) or 5 (Fractional): 0 = Horizontal stacking; 1 = Diagonal stacking; 2 = Not stacked
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Ratio of minor axis to major axis for elliptic entities or a two values ratio
Example:
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: An ellipse is specified by a Point, a RadPt, Ratio, Start and End angles.. -->
<add>
<cstEllipse Point="0,0,0" RadPt="2,0,0" Ratio="0.5" StartAngle="0" EndAngle="360"/>
</add>
<fittosize />
</cadsofttools>
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Adds entities -->
<add>
<cstSectionObjects Name="OBJECTS">
<SubEntities>
<cstDictionary name="IMAGEDEFS">
<SubEntities>
<!-- FileName="Specify the file path" -->
<cstImageDef FileName="C:\Users\Username\Documents\CADEditorX 15\Samples\image.jpg" HandleSave="@1"/>
</SubEntities>
</cstDictionary>
</SubEntities>
</cstSectionObjects>
<!-- Point - insertion point (corresponds to the bottom left corner of the image) -->
<!-- Point1 - top left corner in the drawing coordinates (top left corner of the image) -->
<!-- Point2 - bottom right corner in the drawing coordinates (bottom right corner of the image) -->
<cstImageEnt Point="0,0,0" imagedef="@1">
<Calc mode="0" Point1="0,100,0" Point2="100,0,0"/>
</cstImageEnt>
<cstImageEnt Point="0,0,0" imagedef="@1">
<Calc mode="1" Width="100" Height="400" Angle="30"/>
</cstImageEnt>
</add>
<fittosize />
</cadsofttools>
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: The example shows how to add a complicated Drawing Structure Data to the current drawing. -->
<add>
<cstSectionTables Name="TABLES">
<SubEntities>
<cstTable Name="LAYER">
<SubEntities>
<cstLayer name="Layer2" Color="0;3;" Visible="False" Locked="True"/>
</SubEntities>
</cstTable>
</SubEntities>
</cstSectionTables>
</add>
</cadsofttools>
Example 2:
Description: getting a list of all the layers of a drawing and their info.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: getting a list of all the layers of a drawing and their info. -->
<get PathName="TABLES;LAYER"/>
</cadsofttools>
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: A Line is specified by two Points. -->
<add>
<cstLine point="0,0,0" Point1="10,5,0"/>
</add>
<fittosize/>
</cadsofttools>
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
<?xml version="1.0" encoding="utf-8"?>
<!-- Description: An Mtext is specified by a Point, a Height and a Textvalue. -->
<cadsofttools version="2">
<add>
<cstMText Point="0,0" Height="3" TextValue="MultilineText"/>
</add>
<fittosize />
</cadsofttools>
Example 2:
Description: The following code uses many optional parametres for MText.
<?xml version="1.0" encoding="utf-8"?>
<!-- Description: The following code uses many optional parametres for MText. -->
<cadsofttools version="2">
<add>
<cstMText Point="10.5,5,1.33" Layer="Layer1" color="1;(145,30,45)" LineWeight="0.23" LineType="byblock" LineTypeScale="0.25" Extrusion="1,2,1" Angle="15" PScale="1,2,1" Height="3.5" StyleName="STANDARD" RectWidth="20.1" TextValue="MultilineText"/>
</add>
<fittosize />
</cadsofttools>
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Example 2:
Description: When a Point is added, the maximal number of parameters is used.
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: When a Point is added, the maximal number of parameters is used. -->
<add>
<cstPoint Point="-0.56,1.69,-10.15" Layer="Layer1" Color="0;5" LineWeight="0.25" LineType="byblock" LineTypeScale="0.3"/>
</add>
</cadsofttools>
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: The instruction ADD adds entities and Drawing Structure Data to the current drawing. There are many examples of adding particular classes with ADD instruction which are described in Classes examples. -->
<add>
<cstLWPolyline Point="0,0" Thickness="5">
<SubEntities>
<cstVertex Point="0,0"/>
<cstVertex Point="10,0"/>
<cstVertex Point="10,10"/>
</SubEntities>
</cstLWPolyline>
</add>
<fittosize />
</cadsofttools>
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Sets the fraction format when the DimLUnit system variable is specified as 4 (Architectural) or 5 (Fractional): 0 = Horizontal stacking; 1 = Diagonal stacking; 2 = Not stacked
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
<?xml version="1.0" encoding="utf-8"?>
<!-- Description: A circle is specified by a Point and a Radius. -->
<cadsofttools version="2">
<!-- Adds entities -->
<add>
<cstSpline Point="0,0,0" StartTangentVector="0,0,0" EndTangentVector="0,0,0">
<FitPoints Type="FPoint" Values="0,0,0|0,10.5,0|8.1,-10,0|15,10,0|20,-10,0"/>
</cstSpline>
</add>
<fittosize />
</cadsofttools>
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Setting the font (regular, italic, bold, bold italic) when adding a text style. It is compulsory to use
the parameters PrimaryFont and FontStyle. Names for other fonts in PrimaryFont can differ from FontName. -->
<add>
<cstSectionTables Name="TABLES">
<SubEntities>
<cstTable Name="STYLE">
<SubEntities>
<cstStyle Name="STANDARD-1" PrimaryFont="arial.ttf" FontName="Arial" FontStyle="0"/>
<cstStyle Name="STANDARD-2" PrimaryFont="ariali.ttf" FontName="Arial" FontStyle="1"/>
<cstStyle Name="STANDARD-3" PrimaryFont="arialbd.ttf" FontName="Arial" FontStyle="2"/>
<cstStyle Name="STANDARD-4" PrimaryFont="arialbi.ttf" FontName="Arial" FontStyle="3"/>
</SubEntities>
</cstTable>
</SubEntities>
</cstSectionTables>
</add>
</cadsofttools>
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Adding a file to the current drawing as an external reference. The path to the Xref is specified in the BLOCKS section, the Flags and Name parameters are compulsory. -->
<add>
<cstSectionBlocks Name="BLOCKS">
<SubEntities>
<cstBlock Flags="4" Name="xref">
<SubEntities>
<!-- FileName="Specify the file path" -->
<cstXref FileName="C:\Users\Username\Documents\CADEditorX 15\Samples\Gasket.dwg"/>
</SubEntities>
</cstBlock>
</SubEntities>
</cstSectionBlocks>
<!-- Adds entities Model -->
<cstInsert Point="0.5,-0.5,0" BlockName="xref" Extrusion="0,0,1" Angle="0" PScale="1,1,1"/>
</add>
<fittosize />
</cadsofttools>
Sets the fraction format when the DimLUnit system variable is specified as 4 (Architectural) or 5 (Fractional): 0 = Horizontal stacking; 1 = Diagonal stacking; 2 = Not stacked
Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnApplicationExeption event. The result is the id of the drawing, the name and the description of the error-->
<signtoevent Event="OnApplicationExeption" Enabled="True"/>
</cadsofttools>
SignToOnCancelEntities
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnCancelEntities event. The result is the handle of the object that will not be added.
For instance, the user has started to create a line and then pressed esc. As a result, the handle of this line will be returned-->
<signtoevent Event="OnCancelEntities" Enabled="True"/>
</cadsofttools>
SignToOnChangeEntities
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnChangeEntities event. The result is a list of handles of the modified objects-->
<signtoevent Event="OnChangeEntities" Enabled="True"/>
</cadsofttools>
SignToOnConfirmEntitiesDeletion
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnConfirmEntitiesDeletion event. Result is a list of deleted entities handles.
The entities deletion works only with xml commands. -->
<signtoevent Event="OnConfirmEntitiesDeletion" Enabled="True"/>
</cadsofttools>
SignToOnCopyEntities
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnCopyEntities event. The result is the number and a list of handles of the copied objects-->
<signtoevent Event="OnCopyEntities" Enabled="True"/>
</cadsofttools>
SignToOnCreateEntities
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnCreateEntities event. The result is the handle of the created object-->
<signtoevent Event="OnCreateEntities" Enabled="True"/>
</cadsofttools>
SignToOnDeleteEntities
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnDeleteEntities event. The result is a list of handles of the deleted objects and their number-->
<signtoevent Event="OnDeleteEntities" Enabled="True"/>
</cadsofttools>
SignToOnDragAndDrop
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnDragAndDrop event. The result is the list of files that were dragged and dropped on the application -->
<signtoevent Event="OnDragAndDrop" Enabled="True"/>
</cadsofttools>
SignToOnKeyDown
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnKeyDown event. The result is the key of the pressed key.
Please also see the OnKeyUp, OnKeyPress event-->
<signtoevent Event="OnKeyDown" Enabled="True"/>
</cadsofttools>
SignToOnLayoutBeforeChange
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnLayoutBeforeChange event. The result is the events before switchingto the layout.
Please also see the OnLayoutAfterChange event-->
<signtoevent Event="OnLayoutBeforeChange" Enabled="True"/>
</cadsofttools>
SignToOnMeasure
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnMeasure event. The result is the measurements with the tools on the Viewer tab on the ribbon-->
<signtoevent Event="OnMeasure" Enabled="True"/>
</cadsofttools>
SignToOnMenuButtonClick
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnMenuButtonClick event. The result is the caption and the handle of the button in the custom menu in the ribbon-->
<signtoevent Event="OnMenuButtonClick" Enabled="True"/>
</cadsofttools>
SignToOnMenuContextClick
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnMenuContextClick event. The result is the caption and the index of the button in the custom context menu-->
<signtoevent Event="OnMenuContextClick" Enabled="True"/>
</cadsofttools>
SignToOnMouseDown
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnMouseDown event. Result is X and Y in the screen and global coordinates.
Please also see the OnMouseMove, OnMouseUp, OnMouseWheel events-->
<signtoevent Event="OnMouseDown" Enabled="True"/>
</cadsofttools>
SignToOnPaint
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnPaint event. The result is the id of the drawing where the background or object color has been modified-->
<signtoevent Event="OnPaint" Enabled="True"/>
</cadsofttools>
SignToOnPasteEntities
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnPasteEntities event. The result is the handle of the pasted object-->
<signtoevent Event="OnPasteEntities" Enabled="True"/>
</cadsofttools>
SignToOnRedoEntities
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Signs to OnRedoEntities event. The result is a list of handles of the objects that have been modified, deleted or added after the Redo command applied.
Please also see the OnUndoEntities event-->
<signtoevent Event="OnRedoEntities" Enabled="True"/>
</cadsofttools>
SignToOnSelectEntity
Description: Signs to OnSelectEntity event.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Signs to OnSelectEntity event. -->
<!-- Handles 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" Enabled="True"/>
</cadsofttools>
Command line examples
Command line supports hundreds of commands which are described in User Help. Here are some examples which shows the most important command line actions which enhance XML interface.
cmdstat
Description: return command status to XML IDE
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: return command status to XML IDE -->
<command text="GetCommandStatus LineWeight"/>
</cadsofttools>
CmpFiles
Description: Open the Compare dialog and set compared filenames
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Open the Compare dialog and set compared filenames -->
<command text="Comparefiles "drawing1.dxf" "drawing2.dxf""/>
<!-- Optional parameters: Flags DeletedColor AddedColor ModifiedColor UnmodifiedColor -->
<!-- Flags bits: 0 - Handle, 1 - Layer, 2 - LineType, 3 - LineTypeScale, 4 - Thickness, 5 - Color,
6 - LineWeight, 7 - GeomertyDatas-->
<!-- Flags bits for visual compare: 8 - GraphicsOnly, 8 - cf2048, 10 - cf4096, 11 - cf8196-->
<!-- If optional parameters are passed, the Compare dialog are not showed -->
<command text="Comparefiles "drawing1.dxf" "drawing2.dxf" 255"/>
</cadsofttools>
Description: get background color to XML IDE
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: get background color to XML IDE -->
<command text="GetCommandStatus BackgroundColor"/>
</cadsofttools>
getlayout
Description: get the name of the current layout
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: get the name of the current layout -->
<command text="CLayout ?"/>
</cadsofttools>
GetViewMode
Description: GetViewMode instruction returns view mode for the current drawing
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: GetViewMode instruction returns view mode for the current drawing -->
<command text="GetViewMode"/>
</cadsofttools>
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Mirror of the selected objects by base point and angle: mirror BasePoint Angle -->
<command text="mirror 1,1 30"/>
</cadsofttools>
mirror2
Description: Mirrors the selected objects by base point and second point, which defines the angle: mirror BasePoint SecondPoint
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Mirrors the selected objects by base point and second point, which defines the angle: mirror BasePoint SecondPoint -->
<command text="mirror 1,1 0,3"/>
</cadsofttools>
Description: Rotates the selected objects by base point and the second point, which defines the angle: rotate BasePoint SecondPoint
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Rotates the selected objects by base point and the second point, which defines the angle: rotate BasePoint SecondPoint -->
<command text="rotate 1,1 0,4"/>
</cadsofttools>
Description: Hide ScrollBar in the drawing
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Hide ScrollBar in the drawing -->
<command text="ShowScrollbar Off" />
<!-- Description: Show ScrollBar in the drawing -->
<command text="ShowScrollbar On" />
</cadsofttools>
SelectByScreenPoint
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- SelectByScreenPoint X Y is_find_owned_insert -->
<command text="SelectByScreenPoint 10 5 False"/>
</cadsofttools>
SetBkColor
Description: set background color by RGB (BackgroundColor red green blue)
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: set background color by RGB (BackgroundColor red green blue) -->
<command text="BackgroundColor 255 45 0"/>
</cadsofttools>
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Shows the tab set with open drawing -->
<command text="ShowTabSet"/>
<!-- Shows application system buttons -->
<command text="ShowSysButtons"/>
<!-- Shows the application statusbar -->
<command text="ShowStatusbar"/>
<!-- Shows the tab set with layouts -->
<command text="ShowLayoutPanel"/>
<!-- Shows the Interface -->
<command text="ShowInterface"/>
<!-- Shows the menu button -->
<command text="ShowMenuButton"/>
<!-- Shows the Ribbon -->
<command text="Ribbon on"/>
<!-- Shows the Toolbar with caption Tools on the Page with caption Viewer -->
<command text=""ToolbarConf" "Viewer" "Tools" "True""/>
<!-- Shows the Editor page with page caption Editor -->
<command text=""ToolbarConf" "Editor" "allpage" "True""/>
</cadsofttools>
Description: Adds path to path list for search SHX fonts
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Adds path to path list for search SHX fonts -->
<command text="shxfonts C:\"/>
</cadsofttools>
shxfromacad
Description: Imports SHX paths to the path list for search SHX fonts
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Imports SHX paths to the path list for search SHX fonts -->
<command text="shxfromacad"/>
</cadsofttools>
SwitchToModel
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Switches to the model layout. -->
<command text="switchtomodel"/>
</cadsofttools>