一个小问题[VBA]
我在里把图保存为dxf格式的块,在VB里怎么样才能把它插入到现有图形里?
尝试使用用AUTOCAD2002帮助里的代码:
Dim importFile As String
Dim InsertPoint(0 To 2) As Double
Dim scalefactor As Double
importFile = "C:\my documents\DXFExprt.dxf" ' Adjust path for your system
InsertPoint(0) = 0#: InsertPoint(1) = 0#: InsertPoint(2) = 0#
scalefactor = 2#
' Import the file
ThisDrawing.Import importFile, InsertPoint, scalefactor
是可以插入,但不能定位,即使把insertpoint的数值改了,
如insertpoint(0)=300:insertpoint(1)=100
插入后仍然在0,0,0处,请问是什么原因? 我也不懂 图形左下脚的坐标是不是就是(300,200)呢,我估计该是的
插完再移不行吗?
本来就是这个的,设置基点对此类插入是无效的。
我估计你建块时源点不是原来的原点。就会出现这个错误。记住新建块时一个要修改座标到原点为0,0点。再用插入点座标就好了。 同意楼上的,我也是这么做的
页:
[1]