PDA

View Full Version : AutoCAD dxf format for a hidden line, can someone post a R12 dxf?



Zrob
01-15-2009, 06:58 PM
Hi Guys!

Here is the basic format for a typical line, but what do I need to add or change to make a hidden line? Do I need to add $variables and line type table data?



CONTINUOUS
0
LINE
8
111
10
82.230375
20
27.375
30
0
11
0
21
27.375
31
0
62
240
6

Tommy
01-16-2009, 06:47 AM
I saved this dxf from acad 2007 and I think the counter should not be included but can't remeber that far back. I know in release 10 the counter was not required, I thought the counter didn't show up till 14.:dunno




0
LINE
5 <-- this is the header for a counter in hex
CD <-- hex value of the entity
8 <-- layer
0 <-- layer name
6 <--- line type header
HIDDEN <-- line type
10 <-- X start
49.5
20 <-- Y start
26.375
30 <-- Z start
0.0
11 <-- X end
25.3125
21 <-- Y end
24.75
31 <-- Z end
0.0

Zrob
01-17-2009, 07:39 AM
Hi Tommy,

Good to here from you again!

Here is a complete striped down dxf file that should open up in most cad system or viewers. I am outputting this from a JavaScript program so I am trying to keep the format really simple.

To use hidden, don't I need a value for size of the dash? Also do you think I am going to need table info to support line types?

This format is a little different than yours, but I am still trying to add hidden lines then I will try and add points too, but its all just following a simple rectangle part in the end.

Here is a good link:
http://local.wasp.uwa.edu.au/~pbourke/dataformats/dxf/dxf10.html (http://local.wasp.uwa.edu.au/%7Epbourke/dataformats/dxf/dxf10.html)



0
SECTION
2
ENTITIES
0
LINE
8
111 = layer Name
10
0
20
0
30
0
11
12.5
21
0
31
0
62
18 = color of line
6
STANDARD
999
txt shx
0
ENDSEC
0
EOF

Tommy
01-19-2009, 06:51 AM
Yes you would need a table of linetypes. Ltscale controls the length of the dashes. A color of 256 will be "ByLayer". I had "assumed" that the header info was already there I didn't realize that you were importing a line at a time.

Zrob
01-19-2009, 06:49 PM
Ok, I will have to give that a try then, it would be nice to add hidden lines when needed.