又一个关于图块插入的问题!!
我编了一个图块的插入图块,想要的效果是点图片窗,就能在CAD窗体中插入想要的图块但是现在的问题是当点击的时候没有错误警告,就是不能实现图块的插入
哪位高手,给看看!!!
Private Sub Picture1_Click(Index As Integer)<BR>On Error Resume Next<BR>Dim blockRefobj As AcadBlockReference<BR>Dim returnPnt As Variant<BR>Dim insertiongPnt(0 To 2) As Double<BR>Dim FileString As String
AppActivate 万能杆件.Caption <BR>returnPnt = 万能杆件.ActiveDocument.Utility.GetPoint(, "插入点:")<BR><BR>Select Case Index<BR> Case 0<BR> FileString = (App.Path & "\长弦杆(A)型.dwg")
Case 1<BR> FileString = (App.Path & "\长弦杆(B)型.dwg ")
End Select
<BR> Set blockRefobj = 万能杆件.ActiveDocument.ModelSpace.InsertBlock _<BR> (returnPnt, App.Path & FileString, CDbl(Me.Text1.Text), CDbl(Me.Text2.Text), _<BR> CDbl(Me.Text3.Text), CDbl(Me.Text4.Text) * 3.14 / 180)<BR>AppActivate Form1.Caption End Sub
reply
确认FileString = (App.Path & "\长弦杆(B)型.dwg ")是否存在!注意字符"(",及有没有空格,因为有事操作字符串会有多余空格. <P>FileString = (App.Path & "\长弦杆(B)型.dwg ")</P>
<P>Set blockRefobj = 万能杆件.ActiveDocument.ModelSpace.InsertBlock _<BR> (returnPnt, App.Path & FileString, CDbl(Me.Text1.Text), CDbl(Me.Text2.Text), _<BR> CDbl(Me.Text3.Text), CDbl(Me.Text4.Text) * 3.14 / 180)<BR></P>
<P>文件路径重复了app.path</P>
<P> </P>
<P> </P>
页:
[1]