How to retrieve the header properties of the DXF file?

Use this forum to ask questions about how to do things in dxflib.

Moderator: andrew

How to retrieve the header properties of the DXF file?

Postby Cambridge Ray » Mon Nov 05, 2012 12:12 am

I am referring to items like: AutoCAD Version ($ACADVER), etc. Those in Segment #1.

TIA,

-RFH
Cambridge Ray
Junior Member
 
Posts: 15
Joined: Wed Oct 03, 2012 5:26 pm

Re: How to retrieve the header properties of the DXF file?

Postby andrew » Mon Nov 05, 2012 12:27 am

The DL_CreationInterface::setVariable* handlers are called for those.

E.g. for $ACADVER:
Code: Select all
DL_CreationInterface::setVariableString("$ACADVER", "AC1024", 1)
User avatar
andrew
Site Admin
 
Posts: 2565
Joined: Fri Mar 30, 2007 6:07 am

Re: How to retrieve the header properties of the DXF file?

Postby Cambridge Ray » Mon Nov 05, 2012 12:58 am

Thanks, Andrew!

-Ramon

Oooops, I may have spoken too soon. See below...
Last edited by Cambridge Ray on Mon Nov 05, 2012 1:11 am, edited 1 time in total.
Cambridge Ray
Junior Member
 
Posts: 15
Joined: Wed Oct 03, 2012 5:26 pm

Re: How to retrieve the header properties of the DXF file?

Postby Cambridge Ray » Mon Nov 05, 2012 1:09 am

andrew wrote:The DL_CreationInterface::setVariable* handlers are called for those.

E.g. for $ACADVER:
Code: Select all
DL_CreationInterface::setVariableString("$ACADVER", "AC1024", 1)


Andrew:

My only use for dxflib is to read DXF files, and the purpose of the function that you mentioned seems to be to write DXF files.

I am simply trying to extend the sample provided with the distribution, so it dumps information about the DXF files on the screen. I know I can get that info with "less": Its just for my own instruction and curiosity.

-Ramon
Cambridge Ray
Junior Member
 
Posts: 15
Joined: Wed Oct 03, 2012 5:26 pm

Re: How to retrieve the header properties of the DXF file?

Postby andrew » Mon Nov 05, 2012 8:59 am

Everything in DL_CreationInterface is for reading DXF files. Think of the 'setVariable' and 'add*' functions from the perspective of the parser. The parser finds a variable in the DXF file and calls your setVariable* implementations to tell you what it found.
User avatar
andrew
Site Admin
 
Posts: 2565
Joined: Fri Mar 30, 2007 6:07 am


Return to dxflib 'How Do I' Questions

Who is online

Users browsing this forum: No registered users and 1 guest