按dxf的格式写dxf文件!
我现在有点线面的等图元的坐标文件,我想直接按dxf的格式去生成DXF,请问除了entities块中外,其他的五大块我应该注意那些事项,谢谢! 其他五大块可以不管他! 好像光实体段还不能完全解决问题,线型,线宽就不好解决。 Hi,Below is my experience:
header section, <FONT face="Times New Roman" size=2>settings of variables associated with the drawing, ie. drawing size.
</FONT>
table section, can setup line type, text style, layer, ...
block, can be ignored
class, can be ignored, <FONT face="Times New Roman" size=2>application-defined classes
</FONT>
entities, meat are here
object, can be ignored, <FONT face="Times New Roman" size=2>nongraphical objects</FONT> <p>网上找到的</p><p>'Build the header, this header is set with my personal preferences<br/>Private Function DXF_Header() As String<br/>Dim HS(19) As String<br/> HS(0) = " 0|SECTION| 2|HEADER| 9"<br/> HS(1) = "$ACADVER| 1|AC1009| 9"<br/> HS(2) = "$INSBASE| 10|0.0| 20|0.0| 30|0.0| 9"<br/> HS(3) = "$EXTMIN| 10| 0| 20| 0| 30| 0| 9"<br/> HS(4) = "$EXTMAX| 10|368| 20|326| 30|0.0| 9"<br/> HS(5) = "$LIMMIN| 10|0.0| 20|0.0| 9"<br/> HS(6) = "$LIMMAX| 10|100.0| 20|100.0| 9"<br/> HS(7) = "$ORTHOMODE| 70| 1| 9"<br/> HS(8) = "$DIMSCALE| 40|8.0| 9"<br/> HS(9) = "$DIMSTYLE| 2|STANDARD| 9"<br/> HS(10) = "$FILLETRAD| 40|0.0| 9"<br/> HS(11) = "$PSLTSCALE| 70| 1| 0"<br/> HS(12) = "ENDSEC| 0"<br/> </p><p> HS(13) = "SECTION| 2|TABLES| 0"<br/> HS(14) = "TABLE| 2|VPORT| 70| 2| 0|VPORT| 2|*ACTIVE| 70| 0| 10|0.0| 20|0.0| 11|1.0| 21|1.0| 12|50.0| 22|50.0| 13|0.0| 23|0.0| 14|1.0| 24|1.0| 15|0.0| 25|0.0| 16|0.0| 26|0.0| 36|1.0| 17|0.0| 27|0.0| 37|0.0| 40|100.0| 41|1.55| 42|50.0| 43|0.0| 44|0.0| 50|0.0| 51|0.0| 71| 0| 72| 100| 73| 1| 74| 1| 75| 0| 76| 0| 77| 0| 78| 0| 0|ENDTAB| 0"<br/> HS(15) = "TABLE| 2|LTYPE| 70| 1| 0|LTYPE| 2|CONTINUOUS| 70| 0| 3|Solid Line| 72| 65| 73| 0| 40|0.0| 0|ENDTAB| 0"<br/> HS(16) = "TABLE| 2|LAYER| 70| 3| 0|LAYER| 2|0| 70| 0| 62| 7| 6|CONTINUOUS| 0|LAYER| 2|CLOCK_FACE| 70| 0| 62| 7| 6|CONTINUOUS| 0|LAYER| 2|DEFPOINTS| 70| 0| 62| 7| 6|CONTINUOUS| 0|ENDTAB| 0"<br/> HS(17) = "TABLE| 2|VIEW| 70| 0| 0|ENDTAB| 0"<br/> HS(18) = "TABLE| 2|DIMSTYLE| 70| 1| 0|DIMSTYLE| 2|STANDARD| 70| 0| 3|| 4|| 5|| 6|| 7|| 40|1.0| 41|0.18| 42|0.0625| 43|0.38| 44|0.18| 45|0.0| 46|0.0| 47|0.0| 48|0.0|140|0.18|141|0.09|142|0.0|143|25.4|144|1.0|145|0.0|146|1.0|147|0.09| 71| 0| 72| 0| 73| 1| 74| 1| 75| 0| 76| 0| 77| 0| 78| 0|170| 0|171| 2|172| 0|173| 0|174| 0|175| 0|176| 0|177| 0|178| 0| 0|ENDTAB| 0"<br/> HS(19) = "ENDSEC| 0|"<br/> DXF_Header = Join$(HS(), "|")<br/>End Function</p> 读写 dxf谁能提供 可直接调用的源码啊
页:
[1]