Option Explicit Public Sub textatt() Dim objrefer As Variant Dim strname As String Dim objblock As AcadBlock Dim dblx As Double Dim dbly As Double Dim dblz As Double Dim dblrotation As Double
On Error Resume Next dblx = 0 dbly = 0 dblz = 0 dblrotation = 0 With ThisDrawing.Utility ThisDrawing.Utility.InitializeUserInput 1 objrefer = .GetPoint(, vbCr & "pick the inserpoint:") End With On Error Resume Next Set objblock = ThisDrawing.ModelSpace.insertblock(objrefer, "M:\f-0002.dwg", dblx, dbly, dblz, dblrotation) If Err Then MsgBox "unable to insert this block." End Sub
为什么不能插入该文件中的块呢?
谢先!
|