# How do I read drawing extents

**URL:** <http://forum.qcad.org/t/how-do-i-read-drawing-extents/429>\
**Category:** dxflib 'How Do I' Questions\
**Created:** [November 10, 2010, 1:51pm UTC](http://forum.qcad.org/t/how-do-i-read-drawing-extents/429 "2010-11-10T13:51:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgp](http://forum.qcad.org/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@dgp](http://forum.qcad.org/u/dgp)\
**Post date:** [November 10, 2010, 1:51pm UTC](http://forum.qcad.org/t/how-do-i-read-drawing-extents/429/1 "2010-11-10T13:51:22Z")

</div>

Hi,I have a dxf file with the below extents in the header section.  
How do I read them using dxflib ?

$LIMMIN  
10  
-122.3180704378  
20  
47.4300256966  
9  
$LIMMAX  
10  
-122.3078004390  
20  
47.4643399154

---

<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 10, 2010, 7:39pm UTC](http://forum.qcad.org/t/how-do-i-read-drawing-extents/429/2 "2010-11-10T19:39:43Z")

</div>

The DXF parser calls the setVariableVector, setVariableString, setVariableInt or setVariableDouble functions of your DL\_CreationInterface implementation for each such header variable that is found.

---

<div class="post-metadata">

**Author:** ![dgp](http://forum.qcad.org/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@dgp](http://forum.qcad.org/u/dgp)\
**Post date:** [November 11, 2010, 5:34am UTC](http://forum.qcad.org/t/how-do-i-read-drawing-extents/429/3 "2010-11-11T05:34:49Z")

</div>

This is my header section in dxf file

0  
SECTION  
2  
HEADER  
9  
$ACADVER  
1  
AC1009  
9  
$LUNITS  
70  
2  
9  
$LIMMIN  
10  
-122.3180704378  
20  
47.4300256966  
9  
$LIMMAX  
10  
-122.3078004390  
20  
47.4643399154  
9  
$EXTMIN  
10  
-122.3180704378  
20  
47.4300256966  
9  
$EXTMAX  
10  
-122.3078004390  
20  
47.4643399154  
999  
  
  
After using the following function int example dxflib\_test shipped with dxflib ,it gives

**Key#$ACADVER ,Value#AC1009 , Code# 1**

```plaintext
void Test_CreationClass::setVariableString(const char*key , const char*value, int code)
{

	 printf("\n\n\n\t Key#%s ,Value#%s , Code# %d\n",key,value, code
);

	
   
	// printAttributes();

}

```

Is there a way to get values from $LIMMIN and $LIMMAX

---

<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 11, 2010, 8:00am UTC](http://forum.qcad.org/t/how-do-i-read-drawing-extents/429/4 "2010-11-11T08:00:10Z")

</div>

For $LIMMIN / $LIMMAX you are not looking for a string but vector (setVariableVector).

---

<div class="post-metadata">

**Author:** ![dgp](http://forum.qcad.org/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@dgp](http://forum.qcad.org/u/dgp)\
**Post date:** [November 11, 2010, 9:30am UTC](http://forum.qcad.org/t/how-do-i-read-drawing-extents/429/5 "2010-11-11T09:30:42Z")

</div>

Thank you 😃 .I got the dxf boundaries now.

```plaintext
void Test_CreationClass::setVariableVector(const char* key,double v1, double v2, double v3, int code)
{
printf("\n\n\n\t Key#%s ,v1#%f , v2#%f,v3#%f\n",key,v1, v2,v3,code);

}

```
