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.