Page 1 of 1
cstRectangle?
Posted: 06 Apr 2017, 04:55
by agvs
Hello,
I have a question.
I know there are 'cstLine', 'cstCircle', and so on.
By the way, I want to add 'Rectangle' like above.
Do you have 'cstRectangle'?
Let me know.
Thanks,
Re: cstRectangle?
Posted: 07 Apr 2017, 17:44
by support
Hello,
XML API doesn't have cstRectangle object. To add a rectangle, you should use a closed polyline:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<add>
<cstLWPolyline>
<SubEntities>
<cstVertex Point="0,0"/>
<cstVertex Point="20,0"/>
<cstVertex Point="20,10"/>
<cstVertex Point="0,10"/>
<cstVertex Point="0,0"/>
</SubEntities>
</cstLWPolyline>
</add>
</cadsofttools>
Mikhail
Re: cstRectangle?
Posted: 10 Apr 2017, 04:51
by agvs
Thanks,
I applied your way for blocks.
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<add>
<cstSectionBlocks Name="BLOCKS" >
<SubEntities>
<cstBlock name="BTrace" >
<SubEntities>
<cstLWPolyline>
<cstVertex point="0,0"/>
<cstVertex point="150,0"/>
<cstVertex point="150,100"/>
<cstVertex point="0,100"/>
<cstVertex point="0,0"/>
</cstLWPolyline>
</SubEntities>
</cstBlock>
</SubEntities>
</cstSectionBlocks>
</add>
</cadsofttools>
but I got a message like "Unsupported Child cstLWPolyline".
How do I have to do in this situation?
Let me know!
Re: cstRectangle?
Posted: 10 Apr 2017, 17:34
by support
Hello,
You will have to add <SubEntities> node before and after <cstVertex> nodes:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<cadsofttools version="2">
<add>
<cstSectionBlocks Name="BLOCKS">
<SubEntities>
<cstBlock name="BTrace">
<SubEntities>
<cstLWPolyline>
<SubEntities>
<cstVertex point="0,0"/>
<cstVertex point="150,0"/>
<cstVertex point="150,100"/>
<cstVertex point="0,100"/>
<cstVertex point="0,0"/>
</SubEntities>
</cstLWPolyline>
</SubEntities>
</cstBlock>
</SubEntities>
</cstSectionBlocks>
</add>
</cadsofttools>
Mikhail