# How to retrieve the header properties of the DXF file?

**URL:** <http://forum.qcad.org/t/how-to-retrieve-the-header-properties-of-the-dxf-file/964>\
**Category:** dxflib 'How Do I' Questions\
**Created:** [November 4, 2012, 11:12pm UTC](http://forum.qcad.org/t/how-to-retrieve-the-header-properties-of-the-dxf-file/964 "2012-11-04T23:12:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cambridge\_Ray](http://forum.qcad.org/letter_avatar_proxy/v4/letter/c/90ced4/32.png) [@Cambridge\_Ray](http://forum.qcad.org/u/Cambridge_Ray)\
**Post date:** [November 4, 2012, 11:12pm UTC](http://forum.qcad.org/t/how-to-retrieve-the-header-properties-of-the-dxf-file/964/1 "2012-11-04T23:12:36Z")

</div>

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

TIA,

-RFH

---

<div class="post-metadata">

**Author:** ![andrew](http://forum.qcad.org/user_avatar/forum.qcad.org/andrew/32/15013_2.png) [@andrew](http://forum.qcad.org/u/andrew)\
**Post date:** [November 4, 2012, 11:27pm UTC](http://forum.qcad.org/t/how-to-retrieve-the-header-properties-of-the-dxf-file/964/2 "2012-11-04T23:27:59Z")

</div>

The DL\_CreationInterface::setVariable\* handlers are called for those.

E.g. for $ACADVER:

```plaintext
DL_CreationInterface::setVariableString("$ACADVER", "AC1024", 1)

```

---

<div class="post-metadata">

**Author:** ![Cambridge\_Ray](http://forum.qcad.org/letter_avatar_proxy/v4/letter/c/90ced4/32.png) [@Cambridge\_Ray](http://forum.qcad.org/u/Cambridge_Ray)\
**Post date:** [November 4, 2012, 11:58pm UTC](http://forum.qcad.org/t/how-to-retrieve-the-header-properties-of-the-dxf-file/964/3 "2012-11-04T23:58:36Z")

</div>

Thanks, Andrew!

-Ramon

Oooops, I may have spoken too soon. See below…

---

<div class="post-metadata">

**Author:** ![Cambridge\_Ray](http://forum.qcad.org/letter_avatar_proxy/v4/letter/c/90ced4/32.png) [@Cambridge\_Ray](http://forum.qcad.org/u/Cambridge_Ray)\
**Post date:** [November 5, 2012, 12:09am UTC](http://forum.qcad.org/t/how-to-retrieve-the-header-properties-of-the-dxf-file/964/4 "2012-11-05T00:09:00Z")

</div>

> [@andrew](#):
>
> The DL\_CreationInterface::setVariable\* handlers are called for those.
> 
> E.g. for $ACADVER:
> 
> ```plaintext
> 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

---

<div class="post-metadata">

**Author:** ![andrew](http://forum.qcad.org/user_avatar/forum.qcad.org/andrew/32/15013_2.png) [@andrew](http://forum.qcad.org/u/andrew)\
**Post date:** [November 5, 2012, 7:59am UTC](http://forum.qcad.org/t/how-to-retrieve-the-header-properties-of-the-dxf-file/964/5 "2012-11-05T07:59:37Z")

</div>

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.
