Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Read dxf code from VBA?

Status
Not open for further replies.

elev8848

Civil/Environmental
Joined
Jul 24, 2004
Messages
42
Location
US
I need to read dxf code value using VBA - but not using lisp.

Say (96. "somedata") is dxf pair for an entity. I want to know if VBA can directly return "somedata"-if I select an entity.

With lisp, it is as simple as:
(dxf 96 (entget (car (entsel))))
 
DXF files are basic text files so VBA has no problem in opening, reading then closing them.

The difficult part is to understand the DXF file format so you can write the VBA code to parse the file and find the information you are looking for.

I always try to use R12 DXF's as the format is simpler than later versions.
 
Thanks, atook. I was discouraged to try to do this.

Best I can think of right now is to first use lisp to attach the dxf data (that I am after) to entity's Xdata. Then I can use VBA to read it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top