libredwg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libredwg] Testing LibreDwg - Header Variables.


From: Guruprasad Rane
Subject: Re: [libredwg] Testing LibreDwg - Header Variables.
Date: Fri, 07 Mar 2014 01:25:18 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

There are 17 more variables giving such different values.

Regards
Guruprasad


On Thursday 06 March 2014 11:36 PM, Felipe Castro wrote:
Ok, but for that strange behavior maybe there is some memory corruption anywhere, it´s a somehow difficult bug to find.


2014-03-05 17:14 GMT-03:00 Guruprasad Rane <address@hidden>:
Thanks

It worked...

Just an observation.

I have a R2000 dwg file. The header variable DIMUNIT is set as 2 in the file using CAD. When I try to find the value of DIMUNIT using LibreDwg with following code

printf("\"DIMUNIT\";\"%d\"\n",dwg->header_vars.DIMUNIT);

it gave me value as -678324552. I tried once again without changing the dwg file and it gave me 1929275832. And I tried again it gave me 521680120. Everytime I check it gives different value. Shouldn't it give a same value every time,whether correct or incorrect.

Regards
Guruprasad


On Wednesday 05 March 2014 05:53 AM, Felipe Castro wrote:
Sorry, I answered looking at the code in the simplified LIBdwg for LIBREdwg things are a litle bit longer, because BITCODE_H is declared as a Dwg_Object_Ref, so it should be:

dwg->header_vars.TEXTSTYLE->handleref.code






2014-03-04 13:54 GMT-03:00 Guruprasad Rane <address@hidden>:
Sorry Didnt work

address@hidden:~/libredwg/examples$ gcc guruTest.c -o guruTest -lredwg -lm
guruTest.c: In function ‘output_HeadersVariables’:
guruTest.c:354:59: error: request for member ‘code’ in something not a structure or union
 printf("\"TEXTSTYLE\";\"%d\"\n",dwg->header_vars.TEXTSTYLE.code);
                                                           ^



On Tuesday 04 March 2014 05:24 PM, Felipe Castro wrote:
BITCODE_H is a structure of type Dwg_Handle, which has three fields: code, size, value.

You should access these fields with:

dwg->header_vars.TEXTSTYLE.code
dwg->header_vars.TEXTSTYLE.size
dwg->header_vars.TEXTSTYLE.value

ok?


2014-03-04 4:28 GMT-03:00 Guruprasad Rane <address@hidden>:
HI

I am trying to check whether LibreDwg is able to output header variables correctly.

I was able to get values of most header variables for example
printf("\"DIMASO\";\"%d\"\n",dwg->header_vars.DIMASO);

But I am not able to get vaules of varible with BITCODE_H e.g. variable TEXTSTYLE

Can anyone help me with this? I have very basic knowledge of programming.

Regards
Guruprasad








reply via email to

[Prev in Thread] Current Thread [Next in Thread]