DEMO  

Start the DEMO and create the drawing at the right with the code below.

<entities>
<polyline>
<layername>LayerName</layername>
<layercolor>0</layercolor>
<close>n</close>
<segment>0;0;0</segment>
<segment>50;0;20</segment>
<segment>50;50;10</segment>
<segment>100;50;5</segment>
<segment>100;0;0</segment>
<segment>150;0;0</segment>
</polyline>
</entities>

Examples how to create a DXF are available for: VB, C#, VBA.