Hello,
Recently we tried adding layer lineweight to our DXF 2000 export. The original programmer is no longer working with us, and this is my first time working with DXF so stupid questions may be asked.
We are exporting layers and everything seems to be working fine when we import it into Autocad 2015, except the layer lineweight, which always gets set on Default, instead of a value.
I'll post what we get when we export
TABLE 2 LAYER 5 A61483 100 AcDbSymbolTable 70 2 0 LAYER 5 A61441 100 AcDbSymbolTableRecord 100 AcDbLayerTableRecord 2 0 70 0 62 7 6 CONTINUOUS 370 18 0 LAYER 5 A61475 100 AcDbSymbolTableRecord 100 AcDbLayerTableRecord 2 Plankopf 70 0 62 7 6 CONTINUOUS 370 18 0 ENDTAB
I've tried exporting the same thing from autocad, and compare the results. I've copy-pasted parts of the DXF file, mainly up the chain of dependencies codes 330 and 390, but it still would not work. If i went far enough, it wouldn't even load anymore.
Any ideas?
Thanks a lot
Solved! Go to Solution.
Solved by Gary_J_Orr. Go to Solution.
Does the 2000 file format support a layer lineweight entry?
If you can, get ahold of AutoCAD 2000 program documentation and see if there is a lineweight property listed for drawing entities and the layer dialog. If not, then you could be out of luck.
Have to be careful doing that though. Data for newer features can be left in the DXF file such that they are ignored by earlier versions. If you save-as-DXF from AutoCAD 2014 and then re-open the exact same file with AutoCAD 2014, it won't be the same as if the DXF was produced by or opened with AutoCAD 2000i.
Bica.Bogdan,
I exported two versions from within Acad, one in which I had the lineweights listed as mm's and another in which I had the listed as Inches.
The dxf file remains the same for both exports in terms of how they are stored in the layer table record... A value of 18 will translate to 0.18mm with the display set to mm and will translate to 0.007" when the display is set to Inches... So it becomes more of an Index value when in a DXF file and the AutoCAD function that controls the display of such converts that "index" by applying math to it (a bit of division with your acad environment variables deciding which value it needs to be devided by...
If you are storing the values of 0.18mm as 18 (as your original post seems to show that you are) then it will come down to how you are creating the layers from the dxf values. If using entmake it should translate cleanly I believe as the entget for the layer table returns the same values, but if you are using a command function or something that does a deeper processing to create the layer then... it all depends on the function as to what you may need to do (a bit of long division perhaps 😉
Again, without a snippet of the code that is collecting the data and writing the table record in the DXF file and a snippet of the code that is creating the layer within the drawing... it's all just guesswork on our end
_Gary.
@Bica.Bogdan wrote:
No, i dont think it's that. I exported fron Autocad to DXF 2000, and that code was 370 and 18 not 1800. I didn't spot any mistake when comparing. But ill give it a try when i go to work
Do you really need 18 mm lineweight? I mean 370 18 is 0.18 mm lineweight.
The DEFAULT value is set by the LWDEFAULT system variable
also, here is possivle values from acad help
-1 acLnWtByLayer
-2 acLnWtByBlock
-3 acLnWtByLwDefault
0 acLnWt000
5 acLnWt005
acLnWt009
acLnWt013
acLnWt015
acLnWt018
acLnWt020
acLnWt025
acLnWt030
acLnWt035
acLnWt040
acLnWt050
acLnWt053
acLnWt060
acLnWt070
acLnWt080
acLnWt090
acLnWt100
acLnWt106
acLnWt120
acLnWt140
acLnWt158
acLnWt200
acLnWt211
18, 211, 9, 53.....i don't care i just want it to work. And it doesn't and i have no idea why.
I found this post. And our export is R14 (DXF2000).
We get:
$ACADVER
1
AC1014
Saving with Autocad 2015 to a DXF 2000 (it is not called R14 in the menu) i get AC1015.
Interchanging the codes causes the DXF to fail loading.
So i might well be a version problem. Anyone from Autodesk to confirm maybe?
Thanks
I'll add the dxf file. It's as minimal as possible. If anyone has the time to give it a go, i'll be very thankful.