- 积分
- 15190
- 明经币
- 个
- 注册时间
- 2003-9-13
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2003-10-3 19:28:00
|
显示全部楼层
If TextBox6.Enabled = True Then
If l3 < TextBox7.Text Then '只提供圆角或倒角
If ComboBox1.Enabled = True Then
MsgBox "结束直径小于下段开始直径,此段右端无法形成倒角", vbOKOnly, "数据冲突"
CheckBox4.Value = 0
If Label5.Caption = "倒角距离" Then
rk = TextBox4.Text
zp4(0) = zp3(0) + rk
zp4(1) = zp3(1) + rk
zp4(2) = zp3(2)
Set linelast1 = ThisDrawing.ModelSpace.AddLine(zp3, zp4)
ElseIf Label5.Caption = "圆角半径" Then
rk = TextBox4.Text
zp4(0) = zp3(0) + rk
zp4(1) = zp3(1) + rk
zp4(2) = zp3(2)
zpc1(0) = zp3(0)
zpc1(1) = zp3(1) + rk
zpc1(2) = zp3(2)
starangle = -1.5704
endangle = 0
Set linelast1 = ThisDrawing.ModelSpace.AddArc(zpc1, rk, starangle, endangle)
End If
End If
ElseIf ComboBox1.Enabled = False Then
r2 = 0
zp4(0) = zp3(0) + r2
zp4(1) = zp3(1) + r2
zp4(2) = zp3(2) '23线要修改
Set linelast1 = ThisDrawing.ModelSpace.AddLine(zp3, zp4)
End If
ElseIf ComboBox1.Enabled = True Then
If Label5.Caption = "倒角距离" Then
rk = TextBox4.Text
zp4(0) = zp3(0) + rk
zp4(1) = zp3(1) + rk
zp4(2) = zp3(2)
Set linelast1 = ThisDrawing.ModelSpace.AddLine(zp3, zp4)
ElseIf Label5.Caption = "圆角半径" Then
rk = TextBox4.Text
CheckBox4.Value = 0
zp4(0) = zp3(0) + rk
zp4(1) = zp3(1) + rk
zp4(2) = zp3(2)
zpc1(0) = zp3(0)
zpc1(1) = zp3(1) + rk
zpc1(2) = zp3(2)
Set linelast1 = ThisDrawing.ModelSpace.AddArc(zpc1, rk, -1.5704, 0)
End If
ElseIf ComboBox1.Enabled = False Then
rk = 0
zp4(0) = zp3(0) + rk
zp4(1) = zp3(1) + rk
zp4(2) = zp3(2) '23线要修改
Set linelast1 = ThisDrawing.ModelSpace.AddLine(zp3, zp4)
End If
在代码第2行设置断点会发现即使不符合条件程序(l3=10,textbox7.text=5)也会继续往下走。如果你们觉得还不大明白我将上传此程序所有! |
|