请问我如何在CAD中通过VBA将一个个文件插入到一个已经打开的文件中并另存呢??我用INSERTBLOCK方法好像不行。比如下面代码: Sub insertmoban() Dim pathname As String Dim pointbase(0 To 2) As Double pointbase(0) = 0 pointbase(1) = 0 pointbase(2) = 0 pathname = "C:\Program Files\AutoCAD 2002\Support\塔基模板.dwg"
Dim insertedBlock As AcadBlockReference ThisDrawing.Application.Documents.Open pathname Set insertedBlock = ThisDrawing.ModelSpace.InsertBlock(pointbase, "C:\Documents and Settings\Administrator\桌面\试验\1.dwg", 1#, 1#, 1#, 0) End Sub
|