How to draw text with the dxf->writeText()

Use this forum to ask questions about how to do things in dxflib.

Moderator: andrew

Post Reply
Oleg
Registered Member
Posts: 1
Joined: Thu Jan 13, 2011 2:35 pm

How to draw text with the dxf->writeText()

Post by Oleg » Thu Jan 13, 2011 3:04 pm

Hello!

I have a question. How to use dxf->writeText(...)
In *.dxf file I draw only one text string with dxf->writeText()

AutoCad (2000, 2002, 2004, 2005) error:
AutoCad 2005
The following error was encountered while reading
in TEXT starting at line 1518:
Unexpected DXF group code: 73
Invalid or incomplete DXF input -- drawing discarded.
my code:

Code: Select all

DL_Codes::version exportVersion = DL_Codes::AC1015;
....
dxf->writeText(
		*dw,
		DL_TextData(
		0.0,//X Coordinate of insertion point
		0.0,//Y Coordinate of insertion point.
		0.0,//Z Coordinate of insertion point.
		100.0,//X Coordinate of alignment point
		0.0,//Y Coordinate of alignment point
		0.0,//Z Coordinate of alignment point
		2.5,//Text height
		1.0,//Relative X scale factor.
		0,//0 = default, 2 = Backwards, 4 = Upside down
		0,//Horizontal justification 0 = Left (default), 1 = Center, 2 = Right,3 = Aligned, 4 = Middle, 5 = Fit 
		0,//Vertical justification. 0 = Baseline (default), 1 = Bottom, 2 = Middle, 3= Top
		"some text",// Text string.
		"Standard",//Style (font). 
		0),//Rotation angle of dimension text away from default orientation.
		DL_Attributes("mainlayer",256,-1,"BYLAYER"));
if DL_Codes::AC1009; all is alright, but not support Layers styles and other (AutoCad 11/12)


I use VS2008 with MFC librory

thanks in advance.

dxflib is great work, really nice code. Thanks the author!

Post Reply

Return to “dxflib 'How Do I' Questions”