Description: Instruction ADD adds entities and Drawing Structure Data to the current drawing. There are many examples of adding particular classes by ADD instruction are described in Classes examples.
Instruction add has no parameters.
<?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 by ADD instruction 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: 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: 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: Example shows how to work with HandleSave
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: Example shows how to work with HandleSave -->
<add>
<cstText point="10,10,0" Text="HandleSave is @77" Height="3" HandleSave="@77" />
</add>
<!-- Handle alias @77 can be used for select and other instructions -->
<select Handle="@77" />
<apply Color="0;1;"/>
<FitToSize/>
<!-- Sign to OnSelectEntity event. Handle in result will be the last selected entity.
If you press entity which is created in this example, result will be its real Handle. -->
<signtoevent Event="OnSelectEntity"/>
</cadsofttools>
apply
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. -->
<add> <!-- Add a line to select by handle parameter -->
<cstLine point="0,0,0" Point1="10,0,0" Handlesave="@1" />
</add>
<Select Handle="@1"/>
<apply lineweight="7" point1="50,10,0" Color="0;33;"/>
<!-- Zoom rect of tne selected entities to the screen -->
<ShowSelectedEntities/>
<UnSelect Handle="@1"/>
</cadsofttools>
Example 2:
Description: Example shows how to create text in a box and how to use list of handles.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Description: Example shows how to create text in a box and how to use list of handles. -->
<cadsofttools version="2">
<!-- Create simple rectangular Solid Hatch. Handle of polyline is saved as "@1" -->
<add>
<cstLWPolyline HandleSave="@1">
<SubEntities>
<cstVertex Point="0,0,0"/>
<cstVertex Point="2,0,0"/>
<cstVertex Point="2,1,0"/>
<cstVertex Point="0,1,0"/>
<cstVertex Point="0,0,0"/>
</SubEntities>
</cstLWPolyline>
</add>
<!-- Select polyline -->
<Select Handle="@1"/>
<!-- Create hatch -->
<createhatch/>
<!-- Set red color, it's index is 1 -->
<apply Color="0;1;"/>
<add>
<!-- Create text in box -->
<cstMText Point="0.2,0.6" Height="0.2" TextValue="Text in a box" HandleSave="@2"/>
</add>
<ShowSelectedEntities/>
<!-- Handles can be accepted as a list with ";" separator -->
<UnSelect Handle="@1;@2;$24"/>
</cadsofttools>
Changed
Description: CHANGED is a result of GETDRAWINGCHANGED instruction. CHANGED returns True if any changes were implemented in a Drawing.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: CHANGED is a result of GETDRAWINGCHANGED instruction. CHANGED returns True if any changes were implemented in a Drawing. -->
<getdrawingchanged/>
</cadsofttools>
command
Description: Instruction Command executes Command line with parameters described in Text attribute. Commands are described in 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 user manual, also there are many command examples provided in "Commands" section. -->
<!-- Executes "Line" command, i.e. begins to draw line by mouse: -->
<command text="line"/>
</cadsofttools>
ContextMenu
Description: Context menu instruction allows to replace context menu by a new one or to add new menu items to the top or to the end of current menu.
When user clicks on menu item, its caption returns as event <MenuItemClick caption=" "/>
Sender and onClick parameters of Item are 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 modifier, can be used as a parameter
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Context menu instruction allows to replace context menu by a new one or to add new menu items to the top or to the end of current menu.
When user clicks on menu item, its caption returns as event <MenuItemClick caption=" "/>
Sender and onClick parameters of Item are 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>
CreateHatch
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, also accepts list of handles divided by ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- The editor is switched to the ReadOnly mode, modifying of objects is turned off. -->
<Editor ReadOnly="True"/>
<!--Add or remove the global value for special rendering of the selected objects.-->
<CustomSelectMode CustomDraw="True" Color="0;33;" LineWeight="5" />
<!-- Add or remove the object's handle for special rendering. -->
<CustomSelectMode CustomDraw="True" ReadOnly="False" AskOnDelete="True" Color="0;5;" LineWeight="9" Handle="@1"/>
<CustomSelectMode ReadOnly="True" Handle="@2"/>
<!--When the object is selected its color will be Color="0;5;",-->
<!--when an entity is deleted, a possibility to perform the action if Editor ReadOnly="False" will be requested. -->
<select Handle="@1"/>
<!--When the object is selected its color will be Color="0;33;". The object cannot be deleted. -->
<select Handle="@2"/>
</cadsofttools>
delete
Instruction DELETE deletes selected entities.
Instruction delete has no parameters.
Property of ShowSelectEntities instruction, value of precision calculation.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- The editor is switched to the ReadOnly mode, modifying of objects is turned off. -->
<Editor ReadOnly="True"/>
<!--Add or remove the global value for special rendering of the selected objects.-->
<CustomSelectMode CustomDraw="True" Color="0;33;" LineWeight="5" />
<!-- Add or remove the object's handle for special rendering. -->
<CustomSelectMode CustomDraw="True" ReadOnly="False" AskOnDelete="True" Color="0;5;" LineWeight="9" Handle="@1"/>
<CustomSelectMode ReadOnly="True" Handle="@2"/>
<!--When the object is selected its color will be Color="0;5;",-->
<!--when an entity is deleted, a possibility to perform the action if Editor ReadOnly="False" will be requested. -->
<select Handle="@1"/>
<!--When the object is selected its color will be Color="0;33;". The object cannot be deleted. -->
<select Handle="@2"/>
</cadsofttools>
ExportParams
ExportParams is a child attribute of SAVE instruction.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Save using XML export parametrs -->
<!-- Save as raster image-->
<save>
<ExportParams FileName="%SGDRAWINGSPATH%/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>
<!-- Save as PDF-->
<save>
<ExportParams FileName="%SGDRAWINGSPATH%/ImagePDF" Format=".pdf">
<PageWidth>1024</PageWidth>
<PageHeight>1024</PageHeight>
<Author>Author</Author>
<!-- Select layouts for export:
0: Model;
1: AllLayouts;
2:LayoutByName;
3:AllPaperSpaces;
4:CurrentLayout; -->
<LayoutExportMode>1</LayoutExportMode>
<!-- Used if layouts export mode is 'LayoutByName' -->
<LayoutNameExportMode></LayoutNameExportMode>
</ExportParams>
</save>
<!-- Save as DXF -->
<save>
<ExportParams FileName="%SGDRAWINGSPATH%/ImageDXF" Format=".dxf">
<Version>acR2004</Version>
<IsConvertImageToOLE>True</IsConvertImageToOLE>
</ExportParams>
</save>
<!-- Save as DWG -->
<save>
<ExportParams FileName="%SGDRAWINGSPATH%/ImageDWG" Format=".dwg">
<Version>acR2000</Version>
<IsConvertImageToOLE>True</IsConvertImageToOLE>
</ExportParams>
</save>
</cadsofttools>
FitToSize
Description: Instruction FITTOSIZE fits the drawing to the view area proportionally.
Instruction FitToSize has no parameters.
Example:
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Description: 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, instruction returns properties of the entity specified by this handle.
Handle can be given directly via $ or indirectly via @ attributes, also accepts list of handles divided by ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
<?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, instruction returns properties of the entity specified by this handle. -->
<get/>
</cadsofttools>
Example 2:
Description: This example adds and 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 and 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 getting access to the object according to its path in the Converter name space -->
<!-- Example: "TABLES;LAYER" "TABLES;STYLE;STANDARD" -->
<get PathName="TABLES;LAYER"/>
</cadsofttools>
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: GETDRAWINGCHANGED instruction checks if any changes were made in a Drawing. Result parameter CHANGED returns True if any changed were implemeted in a Drawing. -->
<getdrawingchanged/>
</cadsofttools>
getimage
Description: Returns picture of current view in Base64 encoding.
MenuItemClick is a result instruction only. Result instruction. Returns caption of clicked context menu item and its index.
Instruction menuItemClick has no parameters.
Registration
Instruction REGISTRATION can be used for input license key to CADSoftTools software.
Instruction Registration has no parameters.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!--0 - Registration error. -->
<!--1 - Registration was successful. -->
<!--2 - The application has been registered before. -->
<registration User="" EMail="" Key=""/>
</cadsofttools>
Handle can be given directly via $ or indirectly via @ attributes, also accepts list of handles divided by ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
Show (True) or not to show (False) editor markers for selected entity.
Example:
<?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 marker is shown only for text. -->
<select Handle="@1" Marker="True" />
<select Handle="@2" Marker="False" />
<!-- Change color for both selected entities -->
<apply Color="0;1" />
</cadsofttools>
Selected
SELECTED is a result node of GETSELECTED instruction, which stores handles of selected entities.
Handle can be given directly via $ or indirectly via @ attributes, also accepts list of handles divided by ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
SetCustomInsert
Instruction SetCustomInsert has no parameters.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Change the color and lineweight for the insert -->
<SetCustomInsert Handle="@1" Color="0;3;" LineWeight="3"/>
</cadsofttools>
SetView
Instruction SETVIEW zooms view area to a given cstVport data. Use with GETVIEW instruction.
Instruction SetView has no parameters.
Instruction SHOWRECT zooms view area to a given rectangular data.
Instruction showrect has no parameters.
showselectedentities
Instruction SHOWSELECTEDENTITIES zooms view to show selected entities. Parameters are set in Editor Instruction.
Instruction showselectedentities has no parameters.
Example:
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<!-- Instruction SHOWSELECTEDENTITIES zooms view to show selected entities. Please select any entities by mouse or by SELECT instruction before executing SHOWSELECTEDENTITIES. -->
<ShowSelectedEntities/>
</cadsofttools>
signtoevent
Description: Instruction SignToEvent signs for particular events to accept callbacks with XML data.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Instruction SignToEvent signs for particular events to accept callbacks with XML data. -->
<signtoevent Event="OnMouseDown" Enabled="True"/>
<signtoevent Event="OnSelectEntity" Enabled="True"/>
<signtoevent Event="OnConfirmEntitiesDeletion" Enabled="True"/>
<!-- To find out if an event was set, use the command signtoevent without attributes. -->
<signtoevent/>
</cadsofttools>
Success
SUCCESS is a result node when ProcessXML is called successfully.
Instruction Success has no parameters.
SupportedClassesList
Returns classes of objects (lines, sections, layers, etc.) supported by the XML interface. All objects are returned with default values.
Instruction SupportedClassesList has no parameters.
Handle can be given directly via $ or indirectly via @ attributes, also accepts list of handles divided by ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
Undefined
Instruction Undefined has no parameters.
unload
Instruction unload has no parameters.
unselect
Instruction UNSELECT unselects entities which are given by Handles.
Handle can be given directly via $ or indirectly via @ attributes, also accepts list of handles divided by ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
Example:
<?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>
Handle can be given directly via $ or indirectly via @ attributes, also accepts list of handles divided by ";" sign. For example: Handle="$24", Handle="@1", Handle="@;$27;$28"
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" Value="" />
</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.
<?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>
</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.
<?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>
</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.
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Add entities -->
<add>
<cstSectionObjects Name="OBJECTS">
<SubEntities>
<cstDictionary name="IMAGEDEFS">
<SubEntities>
<!-- FileName="Specify the file path" -->
<cstImageDef FileName="%SGSAMPLESPATH%\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: 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: 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: 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" Linetype="Center" Lineweight= "Bylayer" Locked="True"/>
</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.
<?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.
<?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: When an Mtext is added, a maximal number of parameters is used.
<?xml version="1.0" encoding="utf-8"?>
<!-- Description: When an Mtext is added, a maximal number of parameters is used. -->
<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.
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: Instruction ADD adds entities and Drawing Structure Data to the current drawing. There are many examples of adding particular classes by ADD instruction are described in Claases 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.
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">
<!-- Add 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"/>
</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.
<?xml version="1.0" encoding="utf-8"?>
<!-- Description: A circle is specified by a Point and a Radius. -->
<cadsofttools version="2">
<!-- Add entities -->
<add>
<cstText Color="0;1;" Point="0,0" Height="5" Rotation="0" ObliqueAngle="0" Text="Òåêñò" StyleName="STANDARD"/>
</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.
<?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="%SGSAMPLESPATH%\Gasket.dwg"/>
</SubEntities>
</cstBlock>
</SubEntities>
</cstSectionBlocks>
<!-- Add entities Model -->
<cstInsert Point="0.5,-0.5,0" BlockName="xref" Extrusion="0,0,1" Angle="0" PScale="1,1,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.
Event returns handles of the entities to be deleted. Parent application can call a confirmation dialog and delete the entities by command.
SignToEvent examples
SignToOnConfirmEntitiesDeletion
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Sign to OnConfirmEntitiesDeletion event. Result is handles list of deleted entities.
The entities deletion works only by xml commands. -->
<signtoevent Event="OnConfirmEntitiesDeletion"/>
</cadsofttools>
SignToOnMouseDown
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Sign to OnMouseDown event. Result is X and Y in screen and global coordinates -->
<signtoevent Event="OnMouseDown"/>
</cadsofttools>
SignToOnSelectEntity
Example:
<?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>
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.
HideToolbarsPanels
Description: Use commands HideTabSet, HideSysButtons, HideStatusbar,
HideLayoutPanel, HideInterface, HideMenuButton + on/off to hide toolbars and panels
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Use commands HideTabSet, HideSysButtons, HideStatusbar,
HideLayoutPanel, HideInterface, HideMenuButton + on/off to hide toolbars and panels -->
<!-- Hide tab set with open drawing -->
<command text="HideTabSet"/>
<!-- Hide application system buttons -->
<command text="HideSysButtons"/>
<!-- Hide application statusbar -->
<command text="HideStatusbar"/>
<!-- Hide tab set with layouts -->
<command text="HideLayoutPanel"/>
<!-- Hide Interface -->
<command text="HideInterface"/>
<!-- Hide menu button -->
<command text="HideMenuButton"/>
<!-- Hide Ribbon -->
<command text="HideRibbon"/><command text="on"/>
<!-- Hide Toolbar with caption Tools on Page with caption Viewer -->
<command text=""ToolbarConf" "Viewer" "Tools" "False""/>
</cadsofttools>
mirror
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Mirror of selected objects by base point and angle: mirror BasePoint Angle -->
<command text="mirror 1,1 30"/>
</cadsofttools>
mirror2
Description: Mirror of 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: Mirror of selected objects by base point and second point, which defines the angle: mirror BasePoint SecondPoint -->
<command text="mirror 1,1 0,3"/>
</cadsofttools>
rotate
Description: Rotate of selected objects by angle: rotate RotatePoint Angle
Example:
Description: Rotate of selected objects by base point and second point, which defines the angle: rotate BasePoint SecondPoint
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Description: Rotate of selected objects by base point and second point, which defines the angle: rotate BasePoint SecondPoint -->
<command text="rotate 1,1 0,4"/>
</cadsofttools>
savetopng
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Save as PNG: save Filename.png Width Height Bitperpixel[default = 24] -->
<command text="filedia 0">
<command text="save "%SGDRAWINGSPATH%\Image1.png" 200 100"/>
<command text="filedia 1">
</cadsofttools>
ShowToolbar
Example:
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<!-- Show tab set with open drawing -->
<command text="ShowTabSet"/>
<!-- Show application system buttons -->
<command text="ShowSysButtons"/>
<!-- Show application statusbar -->
<command text="ShowStatusbar"/>
<!-- Show tab set with layouts -->
<command text="ShowLayoutPanel"/>
<!-- Show Interface -->
<command text="ShowInterface"/>
<!-- Show menu button -->
<command text="ShowMenuButton"/>
<!-- Show Ribbon -->
<command text="HideRibbon"/><command text="off"/>
<!-- Show Toolbar with caption Tools on Page with caption Viewer -->
<command text=""ToolbarConf" "Viewer" "Tools" "True""/>
</cadsofttools>