Thanks Reini.

As I said, sometimes asking the question leads to the answer.

I feel a bit foolish now.

On Thu, Nov 2, 2023 at 2:44 PM Reini Urban <[email protected]> wrote:

> I do think the modelspace layout extmin/max points are filled. Just the
> header vars
>
> Dave Coventry <[email protected]> schrieb am Do., 2. Nov. 2023, 11:33:
>
>> Not to worry.
>>
>> I can access all the header variables with:
>>
>> dwg->header_vars.EXTMIN
>>
>> Which produces the correct result.
>>
>> Sorry about that, but sometimes, when you ask a question, you can see an
>> avenue that you can explore to get your answer.
>>
>> Many thanks for a great set of programs.
>>
>> ~ dave
>>
>> On Thu, Nov 2, 2023 at 10:48 AM Dave Coventry <[email protected]>
>> wrote:
>>
>>> Hi Reini,
>>>
>>> I'm trying to access the EXTMIN and EXTMAX points on my drawings, but it
>>> doesn't seem to work on Mosdelspace.
>>>
>>> GDB output:
>>> (gdb) p o[i]
>>> $1 = {size = 287, address = 896519, type = 82, index = 71,
>>>   fixedtype = DWG_TYPE_LAYOUT, name = 0x7ffff7c1b514 "LAYOUT",
>>>   dxfname = 0x7ffff7c1b514 "LAYOUT", supertype = DWG_SUPERTYPE_OBJECT,
>>> tio = {
>>>     entity = 0x55555565c790, object = 0x55555565c790}, handle = {
>>>     code = 0 '\000', size = 3 '\003', value = 111346, is_global = 0
>>> '\000'},
>>>   parent = 0x5555555590a0 <dwg>, klass = 0x0, bitsize = 2138,
>>>   bitsize_pos = 10, hdlpos = 2138, was_bitsize_set = 0 '\000',
>>>   has_strings = 1 '\001', stringstream_size = 746, handlestream_size =
>>> 158,
>>>   common_size = 45, num_unknown_bits = 0, unknown_bits = 0x0}
>>> (gdb) p o[i].tio.object.tio.LAYOUT.EXTMIN
>>> $2 = {x = 0, y = 0, z = 0}
>>> (gdb) p o[i].tio.object.tio.LAYOUT.EXTMAX
>>> $3 = {x = 0, y = 0, z = 0}
>>> (gdb)
>>>
>>> Both points are listed as 0,0,0.
>>>
>>> When I convert to DXF using dwg2dxf, the points are listed correctly
>>> under the Environment variables:
>>>
>>>
>>> $EXTMIN
>>>  10
>>> 101373.469907292
>>>  20
>>> -23953.65815822024
>>>  30
>>> 0
>>>   9
>>> $EXTMAX
>>>  10
>>> 141388.5211430994
>>>  20
>>> 4944.114768079045
>>>  30
>>> 0
>>>
>>> Paperspace Layouts are produced correctly, though:
>>>
>>> (gdb) p o[i]
>>> $4 = {size = 431, address = 896082, type = 82, index = 2629,
>>>   fixedtype = DWG_TYPE_LAYOUT, name = 0x7ffff7c1b514 "LAYOUT",
>>>   dxfname = 0x7ffff7c1b514 "LAYOUT", supertype = DWG_SUPERTYPE_OBJECT,
>>> tio = {
>>>     entity = 0x5555558ce170, object = 0x5555558ce170}, handle = {
>>>     code = 0 '\000', size = 3 '\003', value = 932859, is_global = 0
>>> '\000'},
>>>   parent = 0x5555555590a0 <dwg>, klass = 0x0, bitsize = 3188,
>>>   bitsize_pos = 10, hdlpos = 3188, was_bitsize_set = 0 '\000',
>>>   has_strings = 1 '\001', stringstream_size = 1162, handlestream_size =
>>> 260,
>>>   common_size = 655, num_unknown_bits = 0, unknown_bits = 0x0}
>>> (gdb) p o[i].tio.object.tio.LAYOUT.EXTMIN
>>> $5 = {x = 970.76775149435298, y = 28.683126441395416, z = 0}
>>> (gdb) p o[i].tio.object.tio.LAYOUT.EXTMAX
>>> $6 = {x = 1544.767751494353, y = 433.68312644139542, z = 0}
>>>
>>> Is this a bug, or am I doing something wrong?
>>>
>>> ~ Dave
>>>
>>

Reply via email to