XML Reference

  XML_API > CAD XML API Reference >

XML Reference

Previous pageReturn to chapter overviewNext page
CADSoftTools XML Reference

Filter:

Instructions Instruction Parameters Classes Classes Parameters Types Events Command line examples
add AskOnDelete cstAcadTable ACADVer Undefined OnUndefined HideToolbarsPanels
apply Author cstAcadTableStyle Angle Boolean OnMouseDown mirror
Changed base64 cstArc ArcDefPoint Byte OnSelectEntity mirror2
command BitPerPixel cstAttdef Area Word OnConfirmEntitiesDeletion rotate
ContextMenu Bottom cstAttrib Arrowhead Integer rotate2
CreateHatch Calcs cstBlock ArrowSize Int64 savetopng
CustomSelectMode caption cstBlockPattern ArrowType Color ShowToolbar
delete Compression cstBlockRecords Attribs Handle SwitchToModel
Editor CustomDraw cstCircle AttributeMode Single
ExportParams DPUX cstConverter BackClipPlane Double
FitToSize DPUY cstDictionary BasePoint Pointer
get DrawingData cstDimension BigFont String
getbox Enabled cstDimensionStyle BlockName Point
getdrawingchanged Event cstEllipse BLOCKS F2DPoint
getimage File cstEntity Boundaries FPoint
getselected Handle cstField Boundary Rect
GetView Height cstFieldList Bulge F2DRect
Help IsConvertImageToOLE cstFill Calc FRect
Item Items cstGradientPolygon CEColor Version
load LayoutExportMode cstGroup CELTScale ColorCAD
menuItemClick LayoutNameExportMode csthArc CELType EntHandle
Registration Left cstHatch CELWeight EntName
ribbon Marker csthBoundaryList CenterPoint List
save MeasureInPixels csthCurve CircleLength ListItem
select Mode cstHelix CircleZoomPercent StringInternal
Selected PageHeight csthLine CLayer Base64
SetCustomInsert PageWidth csthPoints ClippingBoundaryHandle Singles
SetView Parameters csthPolyline Clockwise FPoints2DOr3D
showrect PathToXMLExamples cstImageDef Closed Procedure
showselectedentities Proportional cstImageEnt CodePage Parameters
signtoevent Quality cstInsert Color
Success ReadOnly cstInsertXRef ColSpacing
SupportedClassesList Result cstLayer ColumnCount
SupportedInstructionsList Right cstLayout ControlPoints
switch ShowEntityMethod cstLeader Count
Undefined ShowEntityPrecision cstLine Dash
unload Text cstLineType DefPoint
unselect Top cstLWPolyline Degree
Transparent cstMPolygon DictValue
Version cstMText DimAlt
Width cstObjectEntity DimAltF
cstOle2Frame DimAPost
cstOwneredItem DimAsz
cstPenTableItem DimCen
cstPoint DimClrD
cstPolyline DimClrE
cstPolyPolygon DimClrT
cstProxy DimDec
cstSection DimExe
cstSectionBlocks DimExo
cstSectionEntities DimGap
cstSectionHeader DimLFac
cstSectionObjects DimLwD
cstSectionTables DimLwE
cstSolid DimPost
cstSortEntsTable DimSah
cstSpline DimScale
cstStyle DimScaleOverall
cstTable DimSD1
cstText DimSD2
cstVertex DimSE1
cstViewport DimSE2
cstVport DimStyle
cstWipeout DimTad
cstXref DimTih
DimTix
DimToh
DIMTXSTY
DimTxt
Elevation
EndAngle
EndParam
EndPoint
EndTangentVector
EndWidth
ENTITIES
ExtData
ExtMax
EXTMIN
Extrusion
FileName
FILLETRAD
FitPoints
FixedHeight
Flags
FontName
FontStyle
FrontClipPlane
Frozen
FrozenByNewViewPort
GlobalWidth
Handle
HandleSave
HatchName
HEADER
Height
ImageDef
InsBase
InsUnits
IsPlotting
IsSolid
Justify
Knot
KnotsPoints
LastHeightUsed
Layer
LeaderPathType
Length
LinDefPoint1
LinDefPoint2
LineAngle
Lines
LineType
LineTypeScale
LineWeight
Locked
LTScale
MajorPoint
Measurement
MiddlePoint
Mode
MSpaceCenter
MSpaceHeight
Name
OBJECTS
ObliqueAngle
Offset
PaperSpaceBlock
PatternAngle
PatternScale
Pattren
Pattrens
PDMODE
PDSIZE
Periodic
Point
Point1
Point2
Point3
PrimaryFont
Properties
PScale
PSpaceCenter
PSpaceHeight
PSpaceWidth
RadDefPoint
Radius
RadPt
Ratio
Rational
RectWidth
Rotation
RowCount
RowSpacing
Scale
Size
SolidFill
Start
StartAngle
StartParam
StartPoint
StartTangentVector
StartWidth
StatusField
StyleName
SubEntities
TABLES
Tag
Text
TextGenFlags
TextSize
TextStyle
TextValue
Thickness
ThisID
TileMode
TurnHeight
Turns
UCSORG
UCSOrigin
UCSVP
UCSXDir
UCSYDir
UVector
Value
Vertex
Vertexes
ViewAspectRatio
ViewCenterPoint
ViewDirection
ViewHeight
ViewTarget
ViewTwistAngle
Visible
VVector
Weight
Weights
Width
WidthFactor
XrefLink

Instructions

add

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.

add accepts the following child attributes:
Parameter Type Description
DrawingData List Drawing data structure

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

Syntax:

<apply Parameters ="String" />
Parameter Type Description
Parameters String Any object's attribute, that has no read-only modifier, can be used as a parameter

apply accepts the following child attributes:
Parameter Type Description
Calcs List Accepts Calc child nodes.

Example:
 
<?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.

Syntax:

<Changed Result ="List" />
Parameter Type Description
Result List Result data.

Example:
 
<?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.

Syntax:

<command Text ="String" />
Parameter Type Description
Text String Text for console command line, help, etc.

Example:
 
<?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.

Syntax:

<ContextMenu Mode ="Integer" />
Parameter Type Description
Mode Integer Context menu mode: 0: replace, 1: add to bottom, 2: add to top

ContextMenu accepts the following child attributes:
Parameter Type Description
Items List Accepts Item child nodes.

Result parameters are:
Parameter Type Description
Parameters String 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.

Syntax:

<CreateHatch HatchName ="String" Angle ="Double" PatternScale ="Double" Color ="ColorCAD" />
Parameter Type Description
HatchName String Hatch Name
Angle Double Angle
PatternScale Double Pattern Scale
Color ColorCAD Color

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"/>
  <Select Handle="@4"/>
  <Select Handle="@5"/>
  <Select Handle="@6"/>
  <createhatch hatchname="SOLID" Color="0;3;"/>
  <UnSelect Handle="@3"/>
  <UnSelect Handle="@4"/>
  <UnSelect Handle="@5"/>
  <UnSelect Handle="@6"/>

  <fittosize />
</cadsofttools>



CustomSelectMode

Instruction CUSTOMSELECTMODE allows to define custom selections and turn to readonly mode with possibility to select sertain entities.

Syntax:

<CustomSelectMode CustomDraw ="Boolean" ReadOnly ="Boolean" AskOnDelete ="Boolean" Color ="ColorCAD" LineWeight ="Double" Handle ="EntHandle" />
Parameter Type Description
CustomDraw Boolean Selected entities are drawn with custom color and lineweight
ReadOnly Boolean Read only status
AskOnDelete Boolean If true, the library asks before deleting entities, which handles are specified in the CUSTOMSELECTMODE parameters
Color ColorCAD Color
LineWeight Double Line Weight in mm
Handle EntHandle 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.

Example:
 
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
  <!-- Select entities to delete -->
  <select Handle="@1"/>
  <delete/>
</cadsofttools>


Editor

Instruction EDITOR specifies parameters for CAD editor.

Syntax:

Width ="Integer" Height ="Integer" Proportional ="Boolean" BitPerPixel ="Byte" MeasureInPixels ="Boolean" Transparent ="Boolean" DPUX ="Byte" DPUY ="Byte" Compression ="String" PageHeight ="Integer" Author ="String" LayoutExportMode ="Byte" LayoutNameExportMode ="String" Version ="String" IsConvertImageToOLE ="Boolean" Height ="Integer" />
<Editor ReadOnly ="Boolean" ShowEntityPrecision ="Double" />
Parameter Type Description
ReadOnly Boolean Read only status
ShowEntityPrecision Double 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.
Parameter Type Description
Width Integer Width
Height Integer Height
Proportional Boolean
BitPerPixel Byte
MeasureInPixels Boolean
Transparent Boolean Set transparency for GIF
DPUX Byte DPI X
DPUY Byte DPI Y
Compression String Compression for raster: LZW, Deflate, JPEG, CCITT3, CCITT4, CCITT6, Rle, Auto, None
PageHeight Integer Page Height
Author String Author
LayoutExportMode Byte Select layouts for export: 0: Model; 1: AllLayouts; 2:LayoutByName; 3:AllPaperSpaces; 4:CurrentLayout.
LayoutNameExportMode String Name of Layout, used if layouts export mode is "LayoutByName."
Version String DWG or DXF version. For instance: acR2004, acR2000.
IsConvertImageToOLE Boolean Converts external images to OLE in DWG/DXF export.
Height Integer Height

Example:
 
<?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.

Syntax:

<get Handle ="EntHandle" />
Parameter Type Description
Handle EntHandle 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"

Result parameters are:
Parameter Type Description
DrawingData List Drawing data structure

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


getbox


Instruction getbox has no parameters.

Example:
 
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
  <getbox/>
  <select Handle="@1;@2"/>
  <getbox/>
  <unselect Handle="@1;@2"/>
  <getbox Handle="@1;@2"/>
  <getbox PathName="BLOCKS;block1"/>
</cadsofttools>


getdrawingchanged


Instruction getdrawingchanged has no parameters.

Example:
 
<?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.

Syntax:

<getimage Top ="Integer" Left ="Integer" Right ="Integer" Bottom ="Integer" Width ="Integer" Height ="Integer" />
Parameter Type Description
Top Integer Top
Left Integer Left
Right Integer Right
Bottom Integer Bottom
Width Integer Width
Height Integer Height

Result parameters are:
Parameter Type Description
base64 Base64 Picture in Base64 encoding.

Example:
 
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
    <!-- Description:  Returns picture of current view in Base64 encoding. -->
  <getimage Top="0" Left="0" Right="2000" Bottom="2000" Weight="777" Height="888"/>
</cadsofttools>


getselected

Description: Instruction GETSELECTED returns handles of the selected entities.
Instruction getselected has no parameters.

Result parameters are:
Parameter Type Description
Selected SELECTED is a result node of GETSELECTED instruction, which stores handles of selected entities.

Example:
 
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
    <!-- Description: Instruction GETSELECTED returns handles of the selected entities.  -->
  <getselected/>
</cadsofttools>


GetView

Instruction GETVIEW asks current view area as cstVport data. Use with SETVIEW instruction.
Instruction GetView has no parameters.

Example:
 
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
  <getview/>
</cadsofttools>


Help

Creates CAD XML API help in html format
Instruction Help has no parameters.


Item

Creates context menu item with caption from parameter "caption". This caption is returned in result data when item is clicked.

Syntax:

<Item caption ="String" />
Parameter Type Description
caption String Caption for menu item


load

Instruction LOAD loads file from HDD or from URL.

Syntax:

<load File ="String" />
Parameter Type Description
File String Path to the file


menuItemClick

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>


ribbon


Instruction ribbon has no parameters.


save


Instruction save has no parameters.

save accepts the following child attributes:
Parameter Type Description
ExportParams ExportParams is a child attribute of SAVE instruction.

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


select

Description: Instruction SELECT selects entity(ies) by its handle(s).

Syntax:

<select Handle ="EntHandle" Marker ="Boolean" />
Parameter Type Description
Handle EntHandle 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"
Marker Boolean 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.

Syntax:

<Selected Handle ="EntHandle" />
Parameter Type Description
Handle EntHandle 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.

Example:
 
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
  <setview>
    <cstVport CircleZoomPercent="100" UCSOrigin="0,0,1" UCSXDir="1,0,0" UCSYDir="0,1,0" UCSVP="false" ViewAspectRatio="1" ViewCenterPoint="0,0,0" ViewDirection="0,0,1" ViewTarget="0,0,0" ViewHeight="0" ViewTwistAngle="0"/>
  </setview>
</cadsofttools>


showrect

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.

Syntax:

<signtoevent Event ="String" Enabled ="Boolean" />
Parameter Type Description
Event String Accepted event names are: "OnSelectEntity" , "OnMouseDown" , OnConfirmEntitiesDeletion.
Enabled Boolean Enabled (True) or Disabled (False)

Example:
 
<?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.

Example:
 
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
  <SupportedClassesList/>
</cadsofttools>


SupportedInstructionsList

Returns all command supported by XML interface
Instruction SupportedInstructionsList has no parameters.


switch

Syntax:

<switch Handle ="EntHandle" />
Parameter Type Description
Handle EntHandle 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.

Syntax:

<unselect Handle ="EntHandle" />
Parameter Type Description
Handle EntHandle 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>


Instruction Parameters

Parameter Type Description
AskOnDelete Boolean If true, the library asks before deleting entities, which handles are specified in the CUSTOMSELECTMODE parameters
Author String Author
base64 Base64 Picture in Base64 encoding.
BitPerPixel Byte
Bottom Integer Bottom
Calcs List Accepts Calc child nodes.
caption String Caption for menu item
Compression String Compression for raster: LZW, Deflate, JPEG, CCITT3, CCITT4, CCITT6, Rle, Auto, None
CustomDraw Boolean Selected entities are drawn with custom color and lineweight
DPUX Byte DPI X
DPUY Byte DPI Y
DrawingData List Drawing data structure
Enabled Boolean Enabled (True) or Disabled (False)
Event String Accepted event names are: "OnSelectEntity" , "OnMouseDown" , OnConfirmEntitiesDeletion.
File String Path to the file
Handle EntHandle 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"
Height Integer Height
IsConvertImageToOLE Boolean Converts external images to OLE in DWG/DXF export.
Items List Accepts Item child nodes.
LayoutExportMode Byte Select layouts for export: 0: Model; 1: AllLayouts; 2:LayoutByName; 3:AllPaperSpaces; 4:CurrentLayout.
LayoutNameExportMode String Name of Layout, used if layouts export mode is "LayoutByName."
Left Integer Left
Marker Boolean Show (True) or not to show (False) editor markers for selected entity.
MeasureInPixels Boolean
Mode Integer Context menu mode: 0: replace, 1: add to bottom, 2: add to top
PageHeight Integer Page Height
PageWidth Integer Page Width
Parameters String Any object's attribute, that has no read-only modifier, can be used as a parameter
PathToXMLExamples String Path to parent XML examples directory for getting them to the HTML Help.
Proportional Boolean
Quality Byte
ReadOnly Boolean Read only status
Result List Result data.
Right Integer Right
ShowEntityMethod Byte Property of ShowSelectEntities instruction, type of precision calculation. Possible parameters are (0: Proportional, 1: Absolute, 2: FitToSize)
ShowEntityPrecision Double Property of ShowSelectEntities instruction, value of precision calculation.
Text String Text for console command line, help, etc.
Top Integer Top
Transparent Boolean Set transparency for GIF
Version String DWG or DXF version. For instance: acR2004, acR2000.
Width Integer Width

Classes

cstAcadTable

Represents an AcadTable in a Drawing Database.

Syntax:

<cstAcadTable LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" BlockName ="EntName" Extrusion ="FPoint" Angle ="Double" PScale ="FPoint" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
BlockName EntName Block Name
Extrusion FPoint Extrusion
Angle Double Angle
PScale FPoint PScale


cstAcadTableStyle

Represents an AcadTableStyle in a Drawing Database.

Syntax:

<cstAcadTableStyle LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name


cstArc

Represents an Arc in a Drawing Database.

Syntax:

<cstArc LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Thickness ="Double" Extrusion ="FPoint" Radius ="Double" Length ="Double" Area ="Double" Height ="Double" EndAngle ="Double" StartAngle ="Double" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Thickness Double Thickness
Extrusion FPoint Extrusion
Radius Double Radius
Length Double Length
Area Double Area
Height Double Height
EndAngle Double End Angle
StartAngle Double Start Angle

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


cstAttdef

Represents an Attdef in a Drawing Database.

Syntax:

<cstAttdef LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Height ="Double" Rotation ="Double" WidthFactor ="Double" ObliqueAngle ="Double" StyleName ="String" Tag ="String" Value ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Height Double Height
Rotation Double Rotation
WidthFactor Double Width Factor
ObliqueAngle Double Oblique Angle
StyleName String Style Name
Tag String Tag
Value String Value

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


cstAttrib

Represents an Attrib in a Drawing Database.

Syntax:

<cstAttrib LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Height ="Double" Rotation ="Double" WidthFactor ="Double" ObliqueAngle ="Double" StyleName ="String" Tag ="String" Value ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Height Double Height
Rotation Double Rotation
WidthFactor Double Width Factor
ObliqueAngle Double Oblique Angle
StyleName String Style Name
Tag String Tag
Value String Value

Example:
 
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
    <!-- Description: Block attributes are added to the child element "Attribs" of the cstInsert object. --> 
  <add>
    <!-- Add a block with attributes -->
    <!-- Attribute flags: 
    1 = Attribute is invisible; 
    2 = This is a constant attribute;
    4 = Verification is required on input of this attribute;
    8 = Attribute is preset.-->
    <cstSectionBlocks Name="BLOCKS">
      <SubEntities>                                                                         
        <cstBlock name="block">
          <SubEntities>
            <cstAttdef flags="1" point="0,0" height="2.5" tag="invisible" value=""/>
            <cstAttdef flags="2" point="0,-4" height="2.5" tag="constant" value="" color="0;1"/>             
            <cstAttdef flags="2" point="0,-8" height="2.5" tag="constant2" value="constant value" color="0;1" StyleName="GOST"/>                         
            <cstAttdef flags="4" point="0,-12" height="2.5" tag="controlled" value=""/> 
            <cstAttdef flags="8" point="0,-16" height="2.5" tag="set" value=""/>                          
            <cstAttdef point="0,-20" height="2.5" tag="tag_attribute" value=""/> 
            <cstAttdef flags="3" point="0,-24" height="2.5" tag="invisible+constant" value="invisible+constant value" color="0;1"/>            
            <cstAttdef flags="5" point="0,-28" height="2.5" tag="invisible+controlled" value=""/>                        
            <cstAttdef flags="9" point="0,-32" height="2.5" tag="invisible+set" value=""/>
            <cstAttdef flags="12" point="0,-36" height="2.5" tag="set+controlled" value=""/>            
            <cstAttdef flags="13" point="0,-40" height="2.5" tag="invisble+control+set" value=""/>            
          </SubEntities> 
        </cstBlock>                                                   
      </SubEntities>                                                         
    </cstSectionBlocks>
    <!-- Add entities Model --> 
    <cstInsert blockname="block" point="0,0">                                       
          <SubEntities>
            <cstAttrib flags="1" point="0,0" height="2.5" tag="invisible" value="invisible value"/>    
            <cstAttrib flags="4" point="0,-12" height="2.5" tag="controlled" value="controlled value"/>
            <cstAttrib flags="8" point="0,-16" height="2.5" tag="set" value="set value" />
            <cstAttrib point="0,-20" height="2.5" tag="tag_attribute" value="attribute value" color="0;5" StyleName="GOST"/> 
            <cstAttrib flags="5" point="0,-28" height="2.5" tag="invisible+controlled" value="invisible+controlled value"/>                        
            <cstAttrib flags="9" point="0,-32" height="2.5" tag="invisible+set" value="invisible+set value"/>
            <cstAttrib flags="12" point="0,-36" height="2.5" tag="set+controlled" value="set+controlled value"/>            
            <cstAttrib flags="13" point="0,-40" height="2.5" tag="invisble+control+set" value=""/>            
          </SubEntities>                                                                                          
    </cstInsert>         
  </add>                                        
  <fittosize/>
</cadsofttools>                                                 


cstBlock

Represents a Block in a Drawing Database.

Syntax:

<cstBlock LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Name String Name


cstBlockPattern

Represents a BlockPattern in a Drawing Database.

Syntax:

<cstBlockPattern LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Name String Name

cstBlockPattern accepts the following child atributes:
Parameter Type Description
ExtData StringInternal Ext Data


cstBlockRecords

Represents a BlockRecords in a Drawing Database.

Syntax:

<cstBlockRecords LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name


cstCircle

Represents a Circle in a Drawing Database.

Syntax:

<cstCircle LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Thickness ="Double" Extrusion ="FPoint" Radius ="Double" Length ="Double" Area ="Double" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Thickness Double Thickness
Extrusion FPoint Extrusion
Radius Double Radius
Length Double Length
Area Double Area

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


cstDictionary

Represents a Dictionary in a Drawing Database.

Syntax:

<cstDictionary LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name


cstDimension

Represents a Dimension in a Drawing Database.

Syntax:

<cstDimension LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" BlockName ="EntName" Extrusion ="FPoint" Angle ="Double" PScale ="FPoint" DimStyle ="String" DefPoint ="FPoint" LinDefPoint1 ="FPoint" LinDefPoint2 ="FPoint" MiddlePoint ="FPoint" ArcDefPoint ="FPoint" RadDefPoint ="FPoint" ArrowType ="Byte" ArrowSize ="Double" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
BlockName EntName Block Name
Extrusion FPoint Extrusion
Angle Double Angle
PScale FPoint PScale
DimStyle String Dim Style
DefPoint FPoint Def Point
LinDefPoint1 FPoint Lin Def Point1
LinDefPoint2 FPoint Lin Def Point2
MiddlePoint FPoint Middle Point
ArcDefPoint FPoint Arc Def Point
RadDefPoint FPoint Rad Def Point
ArrowType Byte Arrow Type
ArrowSize Double Arrow Size

cstDimension accepts the following child atributes:
Parameter Type Description
Properties List Properties


cstDimensionStyle

Represents a DimensionStyle in a Drawing Database.

Syntax:

<cstDimensionStyle LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Name ="String" DimAlt ="Boolean" DimAltF ="Double" DimAPost ="String" DimAsz ="Double" DimSah ="Boolean" DimCen ="Double" DimClrD ="ColorCAD" DimClrE ="ColorCAD" DimClrT ="ColorCAD" DimSD1 ="Boolean" DimSD2 ="Boolean" DimSE1 ="Boolean" DimSE2 ="Boolean" DimDec ="Integer" DimExe ="Double" DimExo ="Double" DimGap ="Double" DimLFac ="Double" DimLwD ="Double" DimLwE ="Double" DimPost ="String" DimScale ="Double" DimTad ="Integer" DimTih ="Boolean" DimTix ="Integer" DimToh ="Boolean" DimTxt ="Double" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Name String Name
DimAlt Boolean Dim Alt
DimAltF Double Dim Alt F
DimAPost String Dim APost
DimAsz Double Dim Asz
DimSah Boolean Dim Sah
DimCen Double Dim Cen
DimClrD ColorCAD Dim Clr D
DimClrE ColorCAD Dim Clr E
DimClrT ColorCAD Dim Clr T
DimSD1 Boolean Dim SD1
DimSD2 Boolean Dim SD2
DimSE1 Boolean Dim SE1
DimSE2 Boolean Dim SE2
DimDec Integer Dim Dec
DimExe Double Dim Exe
DimExo Double Dim Exo
DimGap Double Dim Gap
DimLFac Double Dim LFac
DimLwD Double Dim Lw D
DimLwE Double Dim Lw E
DimPost String Dim Post
DimScale Double Dim Scale
DimTad Integer Dim Tad
DimTih Boolean Dim Tih
DimTix Integer Dim Tix
DimToh Boolean Dim Toh
DimTxt Double Dim Txt


cstEllipse

Represents an Ellipse in a Drawing Database.

Syntax:

<cstEllipse Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Thickness ="Double" Extrusion ="FPoint" EndAngle ="Double" StartAngle ="Double" RadPt ="FPoint" Ratio ="Double" />
Parameter Type Description
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Thickness Double Thickness
Extrusion FPoint Extrusion
EndAngle Double End Angle
StartAngle Double Start Angle
RadPt FPoint Rad Pt
Ratio Double 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> 
  </cadsofttools>


cstEntity

Represents an Entity in a Drawing Database.

Syntax:

<cstEntity LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type


cstField

Represents a Field in a Drawing Database.

Syntax:

<cstField LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name


cstFieldList

Represents a FieldList in a Drawing Database.

Syntax:

<cstFieldList LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name


cstFill

Represents a Fill in a Drawing Database.

Syntax:

<cstFill LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" HatchName ="String" SolidFill ="Boolean" Elevation ="FPoint" Extrusion ="FPoint" Offset ="FPoint" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
HatchName String Hatch Name
SolidFill Boolean Solid Fill
Elevation FPoint Elevation
Extrusion FPoint Extrusion
Offset FPoint Offset

cstFill accepts the following child atributes:
Parameter Type Description
Boundaries List Boundaries


cstGradientPolygon

Represents a GradientPolygon in a Drawing Database.

Syntax:

<cstGradientPolygon LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" HatchName ="String" SolidFill ="Boolean" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
HatchName String Hatch Name
SolidFill Boolean Solid Fill


cstGroup

Represents a Group in a Drawing Database.

Syntax:

<cstGroup LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer


csthArc

Represents a hArc in a Drawing Database.

Syntax:

<csthArc CenterPoint ="FPoint" EndParam ="FPoint" Radius ="Double" StartParam ="FPoint" />
Parameter Type Description
CenterPoint FPoint Center Point
EndParam FPoint End Param
Radius Double Radius
StartParam FPoint Start Param


cstHatch

Represents a Hatch in a Drawing Database.

Syntax:

<cstHatch LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" HatchName ="String" SolidFill ="Boolean" Elevation ="FPoint" Extrusion ="FPoint" Offset ="FPoint" PatternAngle ="Double" PatternScale ="Double" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
HatchName String Hatch Name
SolidFill Boolean Solid Fill
Elevation FPoint Elevation
Extrusion FPoint Extrusion
Offset FPoint Offset
PatternAngle Double Pattern Angle
PatternScale Double Pattern Scale

cstHatch accepts the following child atributes:
Parameter Type Description
Boundaries List Boundaries
Pattrens List Pattrens

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"/>
  <Select Handle="@4"/>
  <Select Handle="@5"/>
  <Select Handle="@6"/>
  <createhatch hatchname="SOLID" Color="0;3;"/>
  <UnSelect Handle="@3"/>
  <UnSelect Handle="@4"/>
  <UnSelect Handle="@5"/>
  <UnSelect Handle="@6"/>

  <fittosize />
</cadsofttools>



csthBoundaryList

Represents a hBoundaryList in a Drawing Database.

Syntax:

<csthBoundaryList />
Parameter Type Description


csthCurve

Represents a hCurve in a Drawing Database.

Syntax:

<csthCurve />
Parameter Type Description


cstHelix

Represents a Helix in a Drawing Database.

Syntax:

<cstHelix LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Thickness ="Double" Extrusion ="FPoint" Degree ="Double" StartTangentVector ="FPoint" EndTangentVector ="FPoint" Start ="FPoint" Radius ="Double" Turns ="Double" TurnHeight ="Double" Clockwise ="Boolean" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Thickness Double Thickness
Extrusion FPoint Extrusion
Degree Double Degree
StartTangentVector FPoint Start Tangent Vector
EndTangentVector FPoint End Tangent Vector
Start FPoint Start
Radius Double Radius
Turns Double Turns
TurnHeight Double Turn Height
Clockwise Boolean Clockwise

cstHelix accepts the following child atributes:
Parameter Type Description
ControlPoints FPoints2DOr3D Control Points
FitPoints FPoints2DOr3D Fit Points
KnotsPoints FPoints2DOr3D Knots Points
Weights Singles Weights


csthLine

Represents a hLine in a Drawing Database.

Syntax:

<csthLine StartPoint ="FPoint" EndPoint ="FPoint" />
Parameter Type Description
StartPoint FPoint Start Point
EndPoint FPoint End Point


csthPoints

Represents a hPoints in a Drawing Database.

Syntax:

<csthPoints />
Parameter Type Description


csthPolyline

Represents a hPolyline in a Drawing Database.

Syntax:

<csthPolyline Closed ="Boolean" />
Parameter Type Description
Closed Boolean Closed

csthPolyline accepts the following child atributes:
Parameter Type Description
Vertexes List Vertexes


cstImageDef

Represents an ImageDef in a Drawing Database.

Syntax:

<cstImageDef LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" FileName ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name
FileName String File Name


cstImageEnt

Represents an ImageEnt in a Drawing Database.

Syntax:

<cstImageEnt LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Thickness ="Double" Extrusion ="FPoint" UVector ="FPoint" VVector ="FPoint" Size ="FPoint" Width ="Double" Height ="Double" ImageDef ="Handle" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Thickness Double Thickness
Extrusion FPoint Extrusion
UVector FPoint UVector
VVector FPoint VVector
Size FPoint Size
Width Double Width
Height Double Height
ImageDef Handle Image Def

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



cstInsert

Represents an Insert in a Drawing Database.

Syntax:

<cstInsert LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" BlockName ="EntName" Extrusion ="FPoint" Angle ="Double" PScale ="FPoint" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
BlockName EntName Block Name
Extrusion FPoint Extrusion
Angle Double Angle
PScale FPoint PScale


cstInsertXRef

Represents an InsertXRef in a Drawing Database.

Syntax:

<cstInsertXRef LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" BlockName ="EntName" Extrusion ="FPoint" Angle ="Double" PScale ="FPoint" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
BlockName EntName Block Name
Extrusion FPoint Extrusion
Angle Double Angle
PScale FPoint PScale


cstLayer

Represents a Layer in a Drawing Database.

Syntax:

<cstLayer LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Name ="String" Visible ="Boolean" Locked ="Boolean" Frozen ="Boolean" FrozenByNewViewPort ="Boolean" XrefLink ="Boolean" IsPlotting ="Boolean" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Name String Name
Visible Boolean Visible
Locked Boolean Locked
Frozen Boolean Frozen
FrozenByNewViewPort Boolean Frozen By New View Port
XrefLink Boolean Xref Link
IsPlotting Boolean Is Plotting

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


cstLayout

Represents a Layout in a Drawing Database.

Syntax:

<cstLayout LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" PaperSpaceBlock ="EntName" UCSOrigin ="FPoint" UCSXDir ="FPoint" UCSYDir ="FPoint" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name
PaperSpaceBlock EntName Paper Space Block
UCSOrigin FPoint UCSOrigin
UCSXDir FPoint UCSXDir
UCSYDir FPoint UCSYDir


cstLeader

Represents a Leader in a Drawing Database.

Syntax:

<cstLeader LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Thickness ="Double" Extrusion ="FPoint" Degree ="Double" StartTangentVector ="FPoint" EndTangentVector ="FPoint" Arrowhead ="Boolean" DimStyle ="String" LeaderPathType ="Integer" ArrowType ="Byte" ArrowSize ="Double" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Thickness Double Thickness
Extrusion FPoint Extrusion
Degree Double Degree
StartTangentVector FPoint Start Tangent Vector
EndTangentVector FPoint End Tangent Vector
Arrowhead Boolean Arrowhead
DimStyle String Dim Style
LeaderPathType Integer Leader Path Type
ArrowType Byte Arrow Type
ArrowSize Double Arrow Size

cstLeader accepts the following child atributes:
Parameter Type Description
ControlPoints FPoints2DOr3D Control Points
FitPoints FPoints2DOr3D Fit Points
KnotsPoints FPoints2DOr3D Knots Points
Weights Singles Weights
Properties List Properties


cstLine

Represents a Line in a Drawing Database.

Syntax:

<cstLine LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Thickness ="Double" Extrusion ="FPoint" Point1 ="FPoint" Length ="Double" Angle ="Double" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Thickness Double Thickness
Extrusion FPoint Extrusion
Point1 FPoint Point1
Length Double Length
Angle Double Angle

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


cstLineType

Represents a LineType in a Drawing Database.

Syntax:

<cstLineType LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Name String Name


cstLWPolyline

Represents a LWPolyline in a Drawing Database.

Syntax:

<cstLWPolyline LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Thickness ="Double" Extrusion ="FPoint" GlobalWidth ="Double" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Thickness Double Thickness
Extrusion FPoint Extrusion
GlobalWidth Double Global Width


cstMPolygon

Represents a MPolygon in a Drawing Database.

Syntax:

<cstMPolygon LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" HatchName ="String" SolidFill ="Boolean" Elevation ="FPoint" Extrusion ="FPoint" Offset ="FPoint" PatternAngle ="Double" PatternScale ="Double" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
HatchName String Hatch Name
SolidFill Boolean Solid Fill
Elevation FPoint Elevation
Extrusion FPoint Extrusion
Offset FPoint Offset
PatternAngle Double Pattern Angle
PatternScale Double Pattern Scale

cstMPolygon accepts the following child atributes:
Parameter Type Description
Boundaries List Boundaries
Pattrens List Pattrens


cstMText

Represents a MText in a Drawing Database.

Syntax:

<cstMText LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" BlockName ="EntName" Extrusion ="FPoint" Angle ="Double" PScale ="FPoint" Height ="Double" StyleName ="String" RectWidth ="Double" TextValue ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
BlockName EntName Block Name
Extrusion FPoint Extrusion
Angle Double Angle
PScale FPoint PScale
Height Double Height
StyleName String Style Name
RectWidth Double Rect Width
TextValue String Text Value

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


cstObjectEntity

Represents an ObjectEntity in a Drawing Database.

Syntax:

<cstObjectEntity LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer


cstOle2Frame

Represents an Ole2Frame in a Drawing Database.

Syntax:

<cstOle2Frame LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point


cstOwneredItem

Represents an OwneredItem in a Drawing Database.

Syntax:

<cstOwneredItem LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name


cstPenTableItem

Represents a PenTableItem in a Drawing Database.

Syntax:

<cstPenTableItem LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Name String Name


cstPoint

Represents a Point in a Drawing Database.

Syntax:

<cstPoint LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point

Example:
 
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
  <!-- Description: Add a Point.  -->
  <add>     
    <cstPoint Point="-0.56,1.9"/> 
  </add> 
</cadsofttools>    

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>


cstPolyline

Represents a Polyline in a Drawing Database.

Syntax:

<cstPolyline LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Thickness ="Double" Extrusion ="FPoint" GlobalWidth ="Double" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Thickness Double Thickness
Extrusion FPoint Extrusion
GlobalWidth Double Global Width

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


cstPolyPolygon

Represents a PolyPolygon in a Drawing Database.

Syntax:

<cstPolyPolygon LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" HatchName ="String" SolidFill ="Boolean" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
HatchName String Hatch Name
SolidFill Boolean Solid Fill


cstProxy

Represents a Proxy in a Drawing Database.

Syntax:

<cstProxy LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Thickness ="Double" Extrusion ="FPoint" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Thickness Double Thickness
Extrusion FPoint Extrusion


cstSection

Represents a Section in a Drawing Database.

Syntax:

<cstSection LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name


cstSectionBlocks

Represents a SectionBlocks in a Drawing Database.

Syntax:

<cstSectionBlocks LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name


cstSectionHeader

Represents a SectionHeader in a Drawing Database.

Syntax:

<cstSectionHeader Name ="String" ACADVer ="String" CodePage ="String" TextStyle ="String" CLayer ="String" CELType ="String" CEColor ="ColorCAD" CELTScale ="Double" CELWeight ="Double" DimStyle ="String" DIMTXSTY ="String" DimAlt ="Boolean" DimAltF ="Double" DimAPost ="String" DimAsz ="Double" DimSah ="Boolean" DimCen ="Double" DimClrD ="ColorCAD" DimClrE ="ColorCAD" DimClrT ="ColorCAD" DimSD1 ="Boolean" DimSD2 ="Boolean" DimSE1 ="Boolean" DimSE2 ="Boolean" DimDec ="Integer" DimExe ="Double" DimExo ="Double" DimGap ="Double" DimLFac ="Double" DimLwD ="Double" DimLwE ="Double" DimPost ="String" DimScale ="Double" DimTad ="Integer" DimTih ="Boolean" DimTix ="Integer" DimToh ="Boolean" DimTxt ="Double" EXTMIN ="FPoint" ExtMax ="FPoint" FILLETRAD ="Double" InsUnits ="Integer" LTScale ="Double" Measurement ="Integer" PDMODE ="Integer" PDSIZE ="Double" TextSize ="Double" TileMode ="Integer" UCSORG ="FPoint" UCSXDir ="FPoint" UCSYDir ="FPoint" InsBase ="FPoint" AttributeMode ="Integer" />
Parameter Type Description
Name String Name
ACADVer String ACADVer
CodePage String Code Page
TextStyle String Text Style
CLayer String CLayer
CELType String CELType
CEColor ColorCAD CEColor
CELTScale Double CELTScale
CELWeight Double CELWeight
DimStyle String Dim Style
DIMTXSTY String DIMTXSTY
DimAlt Boolean Dim Alt
DimAltF Double Dim Alt F
DimAPost String Dim APost
DimAsz Double Dim Asz
DimSah Boolean Dim Sah
DimCen Double Dim Cen
DimClrD ColorCAD Dim Clr D
DimClrE ColorCAD Dim Clr E
DimClrT ColorCAD Dim Clr T
DimSD1 Boolean Dim SD1
DimSD2 Boolean Dim SD2
DimSE1 Boolean Dim SE1
DimSE2 Boolean Dim SE2
DimDec Integer Dim Dec
DimExe Double Dim Exe
DimExo Double Dim Exo
DimGap Double Dim Gap
DimLFac Double Dim LFac
DimLwD Double Dim Lw D
DimLwE Double Dim Lw E
DimPost String Dim Post
DimScale Double Dim Scale
DimTad Integer Dim Tad
DimTih Boolean Dim Tih
DimTix Integer Dim Tix
DimToh Boolean Dim Toh
DimTxt Double Dim Txt
EXTMIN FPoint EXTMIN
ExtMax FPoint Ext Max
FILLETRAD Double FILLETRAD
InsUnits Integer Ins Units
LTScale Double LTScale
Measurement Integer Measurement
PDMODE Integer PDMODE
PDSIZE Double PDSIZE
TextSize Double Text Size
TileMode Integer Tile Mode
UCSORG FPoint UCSORG
UCSXDir FPoint UCSXDir
UCSYDir FPoint UCSYDir
InsBase FPoint Ins Base
AttributeMode Integer Attribute Mode


cstSectionObjects

Represents a SectionObjects in a Drawing Database.

Syntax:

<cstSectionObjects LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name


cstSectionTables

Represents a SectionTables in a Drawing Database.

Syntax:

<cstSectionTables LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name


cstSolid

Represents a Solid in a Drawing Database.

Syntax:

<cstSolid LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Thickness ="Double" Extrusion ="FPoint" Point1 ="FPoint" Length ="Double" Angle ="Double" Point2 ="FPoint" Point3 ="FPoint" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Thickness Double Thickness
Extrusion FPoint Extrusion
Point1 FPoint Point1
Length Double Length
Angle Double Angle
Point2 FPoint Point2
Point3 FPoint Point3


cstSortEntsTable

Represents a SortEntsTable in a Drawing Database.

Syntax:

<cstSortEntsTable LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name


cstSpline

Represents a Spline in a Drawing Database.

Syntax:

<cstSpline LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Thickness ="Double" Extrusion ="FPoint" Degree ="Double" StartTangentVector ="FPoint" EndTangentVector ="FPoint" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Thickness Double Thickness
Extrusion FPoint Extrusion
Degree Double Degree
StartTangentVector FPoint Start Tangent Vector
EndTangentVector FPoint End Tangent Vector

cstSpline accepts the following child atributes:
Parameter Type Description
ControlPoints FPoints2DOr3D Control Points
FitPoints FPoints2DOr3D Fit Points
KnotsPoints FPoints2DOr3D Knots Points
Weights Singles Weights

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


cstStyle

Represents a Style in a Drawing Database.

Syntax:

<cstStyle LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Name ="String" WidthFactor ="Double" ObliqueAngle ="Double" TextGenFlags ="Integer" LastHeightUsed ="Double" PrimaryFont ="String" BigFont ="String" FontName ="String" FixedHeight ="Double" FontStyle ="Integer" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Name String Name
WidthFactor Double Width Factor
ObliqueAngle Double Oblique Angle
TextGenFlags Integer Text Gen Flags
LastHeightUsed Double Last Height Used
PrimaryFont String Primary Font
BigFont String Big Font
FontName String Font Name
FixedHeight Double Fixed Height
FontStyle Integer Font Style


cstTable

Represents a Table in a Drawing Database.

Syntax:

<cstTable LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name


cstText

Represents a Text in a Drawing Database.

Syntax:

<cstText LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Height ="Double" Rotation ="Double" WidthFactor ="Double" ObliqueAngle ="Double" Text ="String" StyleName ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Height Double Height
Rotation Double Rotation
WidthFactor Double Width Factor
ObliqueAngle Double Oblique Angle
Text String Text
StyleName String Style Name

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


cstVertex

Represents a Vertex in a Drawing Database.

Syntax:

<cstVertex Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Point ="FPoint" Bulge ="Double" StartWidth ="Double" EndWidth ="Double" />
Parameter Type Description
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Point FPoint Point
Bulge Double Bulge
StartWidth Double Start Width
EndWidth Double End Width


cstViewport

Represents a Viewport in a Drawing Database.

Syntax:

<cstViewport LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" PSpaceCenter ="FPoint" MSpaceCenter ="FPoint" ViewDirection ="FPoint" ViewTarget ="FPoint" PSpaceWidth ="Double" PSpaceHeight ="Double" FrontClipPlane ="Double" BackClipPlane ="Double" MSpaceHeight ="Double" ViewTwistAngle ="Double" StatusField ="Integer" ThisID ="Integer" ClippingBoundaryHandle ="Handle" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
PSpaceCenter FPoint PSpace Center
MSpaceCenter FPoint MSpace Center
ViewDirection FPoint View Direction
ViewTarget FPoint View Target
PSpaceWidth Double PSpace Width
PSpaceHeight Double PSpace Height
FrontClipPlane Double Front Clip Plane
BackClipPlane Double Back Clip Plane
MSpaceHeight Double MSpace Height
ViewTwistAngle Double View Twist Angle
StatusField Integer Status Field
ThisID Integer This ID
ClippingBoundaryHandle Handle Clipping Boundary Handle


cstVport

Represents a Vport in a Drawing Database.

Syntax:

<cstVport LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" CircleZoomPercent ="Integer" UCSOrigin ="FPoint" UCSXDir ="FPoint" UCSYDir ="FPoint" UCSVP ="Boolean" ViewAspectRatio ="Double" ViewCenterPoint ="FPoint" ViewDirection ="FPoint" ViewTarget ="FPoint" ViewHeight ="Double" ViewTwistAngle ="Double" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name
CircleZoomPercent Integer Circle Zoom Percent
UCSOrigin FPoint UCSOrigin
UCSXDir FPoint UCSXDir
UCSYDir FPoint UCSYDir
UCSVP Boolean UCSVP
ViewAspectRatio Double View Aspect Ratio
ViewCenterPoint FPoint View Center Point
ViewDirection FPoint View Direction
ViewTarget FPoint View Target
ViewHeight Double View Height
ViewTwistAngle Double View Twist Angle


cstWipeout

Represents a Wipeout in a Drawing Database.

Syntax:

<cstWipeout LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Layer ="EntName" Color ="ColorCAD" LineTypeScale ="Double" Point ="FPoint" Thickness ="Double" Extrusion ="FPoint" UVector ="FPoint" VVector ="FPoint" Size ="FPoint" Width ="Double" Height ="Double" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Layer EntName Layer
Color ColorCAD Color
LineTypeScale Double Line Type Scale
Point FPoint Point
Thickness Double Thickness
Extrusion FPoint Extrusion
UVector FPoint UVector
VVector FPoint VVector
Size FPoint Size
Width Double Width
Height Double Height


cstXref

Represents a Xref in a Drawing Database.

Syntax:

<cstXref LineWeight ="Double" Handle ="EntHandle" Flags ="Integer" LineType ="EntName" Name ="String" FileName ="String" />
Parameter Type Description
LineWeight Double Line Weight in mm
Handle EntHandle Handle
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
LineType EntName Line Type
Name String Name
FileName String File Name

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


Parameters

Parameter Type Description
ACADVer String ACADVer
Angle Double Angle
ArcDefPoint FPoint Arc Def Point
Area Double Area
Arrowhead Boolean Arrowhead
ArrowSize Double Arrow Size
ArrowType Byte Arrow Type
Attribs List Attribs
AttributeMode Integer Attribute Mode
BackClipPlane Double Back Clip Plane
BasePoint FPoint Base Point
BigFont String Big Font
BlockName EntName Block Name
BLOCKS List BLOCKS
Boundaries List Boundaries
Boundary List Boundary
Bulge Double Bulge
Calc Procedure Calc
CEColor ColorCAD CEColor
CELTScale Double CELTScale
CELType String CELType
CELWeight Double CELWeight
CenterPoint FPoint Center Point
CircleLength Double Circle Length
CircleZoomPercent Integer Circle Zoom Percent
CLayer String CLayer
ClippingBoundaryHandle Handle Clipping Boundary Handle
Clockwise Boolean Clockwise
Closed Boolean Closed
CodePage String Code Page
Color ColorCAD Color
ColSpacing Double Col Spacing
ColumnCount Integer Column Count
ControlPoints FPoints2DOr3D Control Points
Count Integer Count
Dash Double Dash
DefPoint FPoint Def Point
Degree Double Degree
DictValue String Dict Value
DimAlt Boolean Dim Alt
DimAltF Double Dim Alt F
DimAPost String Dim APost
DimAsz Double Dim Asz
DimCen Double Dim Cen
DimClrD ColorCAD Dim Clr D
DimClrE ColorCAD Dim Clr E
DimClrT ColorCAD Dim Clr T
DimDec Integer Dim Dec
DimExe Double Dim Exe
DimExo Double Dim Exo
DimGap Double Dim Gap
DimLFac Double Dim LFac
DimLwD Double Dim Lw D
DimLwE Double Dim Lw E
DimPost String Dim Post
DimSah Boolean Dim Sah
DimScale Double Dim Scale
DimScaleOverall Double Dim Scale Overall
DimSD1 Boolean Dim SD1
DimSD2 Boolean Dim SD2
DimSE1 Boolean Dim SE1
DimSE2 Boolean Dim SE2
DimStyle String Dim Style
DimTad Integer Dim Tad
DimTih Boolean Dim Tih
DimTix Integer Dim Tix
DimToh Boolean Dim Toh
DIMTXSTY String DIMTXSTY
DimTxt Double Dim Txt
Elevation FPoint Elevation
EndAngle Double End Angle
EndParam FPoint End Param
EndPoint FPoint End Point
EndTangentVector FPoint End Tangent Vector
EndWidth Double End Width
ENTITIES List ENTITIES
ExtData StringInternal Ext Data
ExtMax FPoint Ext Max
EXTMIN FPoint EXTMIN
Extrusion FPoint Extrusion
FileName String File Name
FILLETRAD Double FILLETRAD
FitPoints FPoints2DOr3D Fit Points
FixedHeight Double Fixed Height
Flags Integer Flags are not suggested for usage. They have different meanings for particular entities, most of them are represented also directly via other attributes.
FontName String Font Name
FontStyle Integer Font Style
FrontClipPlane Double Front Clip Plane
Frozen Boolean Frozen
FrozenByNewViewPort Boolean Frozen By New View Port
GlobalWidth Double Global Width
Handle EntHandle Handle
HandleSave EntHandle Handle Save
HatchName String Hatch Name
HEADER List HEADER
Height Double Height
ImageDef Handle Image Def
InsBase FPoint Ins Base
InsUnits Integer Ins Units
IsPlotting Boolean Is Plotting
IsSolid Boolean Is Solid
Justify Integer Justify
Knot Double Knot
KnotsPoints FPoints2DOr3D Knots Points
LastHeightUsed Double Last Height Used
Layer EntName Layer
LeaderPathType Integer Leader Path Type
Length Double Length
LinDefPoint1 FPoint Lin Def Point1
LinDefPoint2 FPoint Lin Def Point2
LineAngle Double Line Angle
Lines List Lines
LineType EntName Line Type
LineTypeScale Double Line Type Scale
LineWeight Double Line Weight in mm
Locked Boolean Locked
LTScale Double LTScale
MajorPoint FPoint Major Point
Measurement Integer Measurement
MiddlePoint FPoint Middle Point
Mode Integer Mode
MSpaceCenter FPoint MSpace Center
MSpaceHeight Double MSpace Height
Name String Name
OBJECTS List OBJECTS
ObliqueAngle Double Oblique Angle
Offset FPoint Offset
PaperSpaceBlock EntName Paper Space Block
PatternAngle Double Pattern Angle
PatternScale Double Pattern Scale
Pattren List Pattren
Pattrens List Pattrens
PDMODE Integer PDMODE
PDSIZE Double PDSIZE
Periodic Boolean Periodic
Point FPoint Point
Point1 FPoint Point1
Point2 FPoint Point2
Point3 FPoint Point3
PrimaryFont String Primary Font
Properties List Properties
PScale FPoint PScale
PSpaceCenter FPoint PSpace Center
PSpaceHeight Double PSpace Height
PSpaceWidth Double PSpace Width
RadDefPoint FPoint Rad Def Point
Radius Double Radius
RadPt FPoint Rad Pt
Ratio Double Ratio
Rational Boolean Rational
RectWidth Double Rect Width
Rotation Double Rotation
RowCount Integer Row Count
RowSpacing Double Row Spacing
Scale Double Scale
Size FPoint Size
SolidFill Boolean Solid Fill
Start FPoint Start
StartAngle Double Start Angle
StartParam FPoint Start Param
StartPoint FPoint Start Point
StartTangentVector FPoint Start Tangent Vector
StartWidth Double Start Width
StatusField Integer Status Field
StyleName String Style Name
SubEntities List Sub Entities
TABLES List TABLES
Tag String Tag
Text String Text
TextGenFlags Integer Text Gen Flags
TextSize Double Text Size
TextStyle String Text Style
TextValue String Text Value
Thickness Double Thickness
ThisID Integer This ID
TileMode Integer Tile Mode
TurnHeight Double Turn Height
Turns Double Turns
UCSORG FPoint UCSORG
UCSOrigin FPoint UCSOrigin
UCSVP Boolean UCSVP
UCSXDir FPoint UCSXDir
UCSYDir FPoint UCSYDir
UVector FPoint UVector
Value String Value
Vertex ListItem Vertex
Vertexes List Vertexes
ViewAspectRatio Double View Aspect Ratio
ViewCenterPoint FPoint View Center Point
ViewDirection FPoint View Direction
ViewHeight Double View Height
ViewTarget FPoint View Target
ViewTwistAngle Double View Twist Angle
Visible Boolean Visible
VVector FPoint VVector
Weight Double Weight
Weights Singles Weights
Width Double Width
WidthFactor Double Width Factor
XrefLink Boolean Xref Link

Types

Type Description
Undefined
Boolean
Byte
Word
Integer
Int64 64bit integer value
Color
Handle Direct Handle via $
Single
Double
Pointer
String
Point
F2DPoint
FPoint Complex type: [X: Double; Y: Double; Z: Double]
Rect
F2DRect
FRect
Version
ColorCAD Complex type: [0: Index | 1: RGB; Value;]
EntHandle $handle or @handle
EntName
List
ListItem
StringInternal
Base64
Singles
FPoints2DOr3D
Procedure
Parameters List of parameters

Events

Parameter Type Description
OnUndefined Undefined Abstract event
OnMouseDown Parameters Return values: mouseDown X="Screen X" Y="Screen Y" globalx="Drawing X" globaly="Drawing Y"
OnSelectEntity String Return values: Result handle="handle of selected entity"
OnConfirmEntitiesDeletion String 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:
 
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
    <!-- Description:  Rotate of selected objects by angle: rotate RotatePoint Angle -->
  <command text="rotate 1,1 30"/>
</cadsofttools>

rotate2

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>






SwitchToModel

Example:
 
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
    <!-- Runs command line -->
  <command text="switchtomodel"/>
</cadsofttools>

Go to ABViewer