我编了一个图块的插入图块,想要的效果是点图片窗,就能在CAD窗体中插入想要的图块
但是现在的问题是当点击的时候没有错误警告,就是不能实现图块的插入
哪位高手,给看看!!!
Private Sub Picture1_Click(Index As Integer) On Error Resume Next Dim blockRefobj As AcadBlockReference Dim returnPnt As Variant Dim insertiongPnt(0 To 2) As Double Dim FileString As String
AppActivate 万能杆件.Caption returnPnt = 万能杆件.ActiveDocument.Utility.GetPoint(, "插入点:")
Select Case Index Case 0 FileString = (App.Path & "\长弦杆(A)型.dwg")
Case 1 FileString = (App.Path & "\长弦杆(B)型.dwg ")
End Select
Set blockRefobj = 万能杆件.ActiveDocument.ModelSpace.InsertBlock _ (returnPnt, App.Path & FileString, CDbl(Me.Text1.Text), CDbl(Me.Text2.Text), _ CDbl(Me.Text3.Text), CDbl(Me.Text4.Text) * 3.14 / 180) AppActivate Form1.Caption End Sub