Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK 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
Jul 24, 2004
42
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))))
 
Replies continue below

Recommended for you

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