We work with a range of machines that can read single layer DXF files in R12 format.
However, we start with DWG or DXF files from Customers that are multilayer, and although we reduce the polygon info to a single layer, when we check the exported DXF there are normally 4 layers.
we always seem to see 4 layers, even when Customers export in R12 format for us.
This means that we can receive a 200k file with only 20K data, and we have to use a text editor to remove the first three layers.
We assume that there is a better way to ensure that Autocad does not output three unwanted layers which are very large and contain no useful data.
Can anyone help.
Please note that the required data are always 2D polygons.
Freeze or turn off the layers not needed, then when dxfout, use Options as shown and select only the objects you need.
This does not seem to work.
Even when a single layer is selected, the file still contains multiple SECTIONS and dummy LAYERS. Depending on source, there are various differences. Mostly there are 4 sections of which only the last has useful information. This is all we need.
0 SECTION 2 ENTITIES 0 LINE 8 APS_GEOMETRY 10 508.000 11 508.000 20 117.000 21 10.000 0 LINE 8 APS_GEOMETRY 10 508.000 11 10.000 20 10.000 21 10.000 0 LINE 8 APS_GEOMETRY 10 10.000 11 10.000 20 10.000 21 117.000 0 ARC 8 APS_GEOMETRY 10 319.340 20 128.772 40 309.391 50 101.210 51 182.264 0 ARC 8 APS_GEOMETRY 10 199.043 20 128.772 40 309.390 50 357.736 51 78.790 0 ENDSEC 0 EOF
Can you help us get to this point automatically. I'm getting fed up with text editing!
Unless this Old-School solution is not old enough for your AutoCAD version, turning FILEDIA off then starting DXFOUT command give you the option to SELECT OBJECTS, which allows you to limit what gets exported to DXF.
Another option: WBLOCK your layers to single DWG files and DXFOUT those new files.
All the above can be automated with lisp, scripts etc.
Option 2 does not work. Already tried it. Leaves dummy layers in the file.
Tried option 1. Not a lot of difference to Option 2.
We can pull in a working DXF in the latest Autocad 2010 version, then save it again it gets substantially larger. Surely there must be a way of doing this without writing an application. We only use AutoCAD for the task of conversion.
If we have to, we would have to write a standalone routine that :
1. Finds the first LINE or ARC command in the file by seeking sequentially.
2. Seeks in reverse to the first layer command found.
3. Extracts the layer in its enirety.
4. Tops and tails and export.
This assumes that LINEs and ARCS are in only one layer.
Has anyone tried this within AutoCAD? We need an application that works with most recent versions of AutoCAD.
Customization Discussion area:
Visual Basic Customization Forum:
Autodesk ObjectARX Customization Forum:
.NET Customization Forum:
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register