本帖最后由 Flyingdancing 于 2012-8-9 10:43 编辑
如下代码:
- Sub BB()
- Dim X As AcadBlockReference
- Dim p As Variant
- p = ThisDrawing.Utility.GetPoint
- Set X = ThisDrawing.ModelSpace.InsertBlock(p, "F:\快捷文档\块\re-s.dwg", 1, 1, 1, 0)
- End Sub
显示“文件处理器错误”,而且奇怪的是,某些DWG文件能够正常使用,某些却不行……我就纠结了
但是,后来改变方法,路径用变量赋值后,结果就正常了……有人能解释吗
- Sub BB()
- Dim X As AcadBlockReference
- Dim p As Variant
- p = ThisDrawing.Utility.GetPoint
- s = "F:\快捷文档\块\re-s.dwg"
- Set X = ThisDrawing.ModelSpace.InsertBlock(p, s, 1, 1, 1, 0)
- End Sub
|