dxf's block's relative coordinate to absolute coordinate?

I'm trying to read dxf file by using dxflib(www.ribbonsoft.com/dxflib/) to my c++ objects and try to write them back to the dwf files. but the
lines,arcs inside the block has relative(local coordinates) so it doesn't get displayed well.
I tried following but doesn't work. the following are dxf file opened in notepad.
///////////////////////// //////////////////////////
BLOC KBLOCKBLOCKBLOCKBLOCK 5 62 330 4A 100 AcDbEntity 8 0 100 AcDbBlockBegin 2 CK_HATCH_0319 70 0 71 0 10 <<<base point of block(y) 0.0 30 0.0 3 CK_HATCH_0319 1
0 LINE 5 4B 330 4A 100 AcDbEntity 8 Unnamed [40] 6 Continuous 62 4 48 2.0 370 0 100 AcDbLine 10 -0.5967346429824829 <<<line (relative coordinate in block: y1) 30 0.0 11 -0.4835976660251617 <<<line (relative coordinate in block: y2) 31 0.0 ///////////////////////////////////////// INSERT INSERT INSERT INSERT ///////////////////////////////////////// INSERT INSERT INSERT INSERT
5 476 330 471 100 AcDbEntity 8 Unnamed [20] 62 2 370 -2 100 AcDbBlockReference 2 _CLOSED 10 -4.805948448181153 << Insert x value 20 -0.1038970574736592 <<<Insert x scale factor 42 0.125 < ////////////// I tried the following code " Those co-ordinates are block base point. Block entites will be first translated
using the base point first. Thus line would be drawn at: line (relative coordinate in block: x1) = Insert x+ (line {relative coordinate
in block: x1}-basepoint) * Insert x scale factor line (relative coordinate in block: x2) = Insert y+ (line {relative coordinate
in block: y1}-basepoint) * Insert y scale factor " but it does work for text and doesn't work for line. plz help thanks winthan
-- Message posted using http://www.talkaboutcad.com/group/alt.cad.autocad / More information at http://www.talkaboutcad.com/faq.html
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

The co-ordinates in the block are relative to the insertion point of the block.
Bob
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.