libredwg
[Top][All Lists]
Advanced

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

Re: [libredwg] Dabbling in some coding.


From: Dave Coventry
Subject: Re: [libredwg] Dabbling in some coding.
Date: Fri, 11 Jun 2021 10:02:13 +0200

Cool! Thanks.

If and when I get something done on this can I submit it?

On Fri, Jun 11, 2021 at 7:26 AM Reini Urban <reini.urban@gmail.com> wrote:
>
>
>
> On Fri, Jun 11, 2021 at 1:16 AM Dave Coventry <dgcoventry@gmail.com> wrote:
>>
>> Hi Reini,
>>
>> I'm quite keen to generate SVG files from my DWG drawings and I've had
>> a look at some of the code you've written in the dwg2SVG module.
>>
>> In particular, I'm looking at generating  MTEXT elements as these are
>> used to describe dimensions in the BLOCKS table.
>>
>> Looking in the dwg.h header file, I see 'typedef struct
>> _dwg_entity_MTEXT' which includes the line 'BITCODE_T text;
>> /*!< DXF 1 */'.
>>
>> If I use this:
>>
>>   Dwg_Entity_MTEXT *text = obj->tio.entity->tio.MTEXT;
>>   fprintf(stderr, "mtext is:%s\n", text->text);
>
>
> fprintf is the problem. %s uses \ for special handling. test->text is fine.
> use fputs or quote the \
>
>>
>>
>> the output is
>>
>> mtext is:\
>>
>> ie, a single backslash.
>>
>> If I look at the dxf output from the same file, it tells me that the
>> DXF_CODE 1 has the entry:
>> '\A1;1700'
>>
>> This describes the figure 1700 with centre alignment (the \A1;' part).
>>
>> How do I access the full content of the MTEXT entity? I don't see any
>> way to access the DXF_CODE 3. Is this because it hasn't been
>> implemented yet?
>>
>> Kind regards,
>>
>> Dave.
>>
>> PS. Thanks for the fantastic work you've done on this.
>>
>
>
> --
> Reini Urban



reply via email to

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