本帖最后由 作者 于 2002-8-27 17:06:32 编辑
ac.ActiveDocument.ModelSpace.InsertBlock insertionPnt, dwgfilefullpath, xscale, yscale, newrotation[br]可能这一条在r14下面不能正常运行。试用2002看。
- Dim myApp As AcadApplication
- Dim myDoc As AcadDocument
- Dim blockRefObj As AcadBlockReference
- Dim returnPnt
- ' 下面这两句适用于vb而不是vba
- ' Set myApp = GetObject(, "AutoCAD.Application")
- ' Set myDoc = myApp.ActiveDocument
- Set myDoc = thisdrawing
- returnPnt = myDoc.Utility.GetPoint(, "Insert point: ")
- Set blockRefObj = myDoc.ModelSpace.InsertBlock(returnPnt,
- "c:\mydir\myblock.dwg", 1.0, 1.0, 0)
Hope this helps
[此贴子已经被作者于2002-8-27 17:02:45编辑过]
[此贴子已经被作者于2002-8-27 17:05:18编辑过] |