28.11.2014 Views

AutoCAD® 2002 - Autodesk

AutoCAD® 2002 - Autodesk

AutoCAD® 2002 - Autodesk

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

'<br />

Function ReadCodes() As Variant<br />

Dim codeStr, valStr As String<br />

Line Input #1, codeStr<br />

Line Input #1, valStr<br />

' Trim the leading and trailing space from the code<br />

ReadCodes = Array(Trim(codeStr), valStr)<br />

End Function<br />

Writing a DXF File<br />

Writing a program that creates a DXF file can be more difficult than one that<br />

reads a DXF file, because you must maintain consistency within the drawing<br />

in order for AutoCAD to find the file acceptable. AutoCAD lets you omit<br />

many items in a DXF file and still obtain a usable drawing.<br />

■<br />

■<br />

■<br />

■<br />

■<br />

■<br />

■<br />

The entire HEADER section can be omitted if you don’t set header<br />

variables.<br />

Any of the tables in the TABLES section can be omitted if you don’t need<br />

to make entries, and the entire TABLES section can be dropped if nothing<br />

in it is required.<br />

If you define any linetypes in the LTYPE table, this table must appear<br />

before the LAYER table.<br />

If no block definitions are used in the drawing, the BLOCKS section can<br />

be omitted.<br />

If present, the BLOCKS section must appear before the ENTITIES section.<br />

Within the ENTITIES section, you can reference layer names even though<br />

you haven’t defined them in the LAYER table. Such layers are automatically<br />

created with color 7 and the CONTINUOUS linetype.<br />

The EOF item must be present at the end of file.<br />

156 | Appendix A Drawing Interchange File Formats

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!