Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

DXF data format

Status
Not open for further replies.

bpeirson

Structural
Apr 7, 2003
147
How is data formatted in DXF. I have viewed a file in notepad and I would like to know how to distinguish various lines and line types.

Any help is appreciated.

 
Replies continue below

Recommended for you

Hi, bpeirson,

The DXF format follows a certain format for lines as shown,

LINE
5
20
100
AcDbEntity
8
0
100
AcDbLine
10
3.634743
20
2.447211
30
0.0
11
11.42476
21
5.082669
31
0.0
0

10,20 & 30 stand for x,y & z for first endpoint, whereas 11, 21 & 31 stand for x,y & z for second endpoint. For more information, go to to Help, and look for DXF File structure (at least in r14) :)

Hope that helps,
Roberttx
 
See
VBA for autoCad 2002
"writing autoCad macros"
by Jefffrey E. Clark
ISBN 0-13-065201-6

I am quoting a paragraph for you..
"The DXF format is fundamentally simple. Each line or record consists of two elements, a GROUP CODE and its DESCRIPTION. the group code is always an integer indicating what kind of data element follows. The description may be an integer, a floatingpoint number, or a string, depending upon the kind of data it represents, The most elementary group code is zero, whose description is always a string indicating the entity type, the section or the endo of a section within a DXF file, or the end of the file...." and it goes on with example:

0
SECTION
2
HEADER
...
...
0
ENDSEC
...
...
0
EOF

"The first two lines 0 SECTION, mark the beginneing of a section fo the file, in this case the header section as denoted by 2 HEADER, which follows immediately. The first ellipsis indicates other entity pairs that follow, until we come to 0 ENDSEC, which marks the end of that section. After the second ellipsis, which indiates other sections, we finally come to 0 EOF, which tells us we are at the end of the file.

There are four main sections to the DXF format:
HEADER, TABLES, BLOCKS, ENTITIES..."

I learnt by creating a simple dxf file with some lines and texts. Then modifying some of the contents such as the texts using notepad- and see what happends to the drawing in AutoCAd.
 
Help >> Developer Help >> DXF Reference

____________________
Acad2005, Terramodel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor