How to write an image into a DXF file

Please use this forum to post feedback and suggestions related to dxflib.

Moderator: andrew

Post Reply
lipengwelcome
Registered Member
Posts: 1
Joined: Mon Aug 25, 2014 9:21 am

How to write an image into a DXF file

Post by lipengwelcome » Tue Aug 26, 2014 3:13 am

Hello
I use dxflib to write an image into a DXF file The bmp file can show in QCAD, but it didn't show in AutoCad. I don't know why .

Code: Select all

		dw->sectionEntities();

		int handle=dxf->writeImage(* dw,
			DL_ImageData("ceshi",
			100,100,0,
			100,100,0,
			599,370,0,
			599,370,50,50,0),
			DL_Attributes("mainlayer", 0, -1, "BYBLOCK"));


	
		m_MyDlDxfBorehole.InitialDxf(&m_GridCtrl,dxf,dw,&stru,geo_stru,laynum);
		m_MyDlDxfBorehole.SetTitle();
		m_MyDlDxfBorehole.SetTableHeader();
		
		
		// Entities Section
		dw->sectionEnd();
//*************************** Entities Section**********************************//
		
		//------- Objects Section -------
		dxf->writeObjects(*dw);
	


		dxf->writeImageDef(*dw,
	 		handle,
	 		DL_ImageData("F:\\vm_system\\inputfile\\ceshi.bmp",
	 		100,100,0,
		100,100,0,
		599,370,0,
		599,370,50,50,0));

		dxf->writeObjectsEnd(*dw);
Thanks!
Li

Post Reply

Return to “dxflib Suggestions and Feedback”