Dim acadApp As AcadApplication
Dim acadDoc As AcadDocument
Dim insertpoint(0 To 2) As Double
On Error Resume Next
Set acadApp = New AutoCAD.AcadApplication
acadApp.WindowState = acMax
acadApp.Visible = True
acadApp.ActiveDocuments.Open "D:\GXYZ\BLOCK\YS.dwg"
'引号内是现有的图块的路径,可以自己定义,或者用APP.PATH,或者用commondialog.showopen都可以获得现有图块的路径
insertpoint(0) = startpoint(0)
insertpoint(1) = startpoint(1)
insertpoint(2) = 0
acadApp.ActiveDocument.ModelSpace.InsertBlock(insertpoint , "D:\GXYZ\BLOCK\YS.dwg", 1#, 1#, 1#, 0)
这个应该可以满足撸主,打开现有图块插入指定坐标
[
本帖最后由 ty1250132 于 2013-5-7 21:19 编辑 ]