Export Sketch to DXF and Control Entity target layers

Export Sketch to DXF and Control Entity target layers

JoeBarnes4076
Advocate Advocate
1,017 Views
1 Reply
Message 1 of 2

Export Sketch to DXF and Control Entity target layers

JoeBarnes4076
Advocate
Advocate

Is there any way to export a sketch to DXF and control the target layer of sketch entities?

 

Solid Lines go to Layer=0

Construction Lines go to Layer=Construction

Center Lines go to Layer=Center

 

I am currently using

           Sketch.DataIO.WriteDataToFile("DXF", strDXFOutputFile)

which send everything to layer=0

 

Joe

0 Likes
1,018 Views
1 Reply
Reply (1)
Message 2 of 2

adam.nagy
Autodesk Support
Autodesk Support

Hi,

 

Unfortunately, it does not seem possible.
In the user interface as well, though you can use a settings xml file in the "DXF File Export Options" dialog under "Customize DWG/DXF", it seems to only control layer related settings in case of flat pattern export.

 

You could however programmatically edit the created DXF file to create those layers and set the entity layers accordingly: http://usa.autodesk.com/adsk/servlet/item?linkID=10809853&id=12272454&siteID=123112

 

Sorry for the bad news.

 

Cheers,



Adam Nagy
Autodesk Platform Services