我编了个简单程序,如下所示:
Private Sub CommandButton1_Click()
Dim ptpick As Variant
Restraint_apply_node.Hide
ptpick = ThisDrawing.Utility.GetPoint
Dim pointobj As AcadPoint
If CheckBox1.Value = 1 Or CheckBox2.Value = 1 Or CheckBox3.Value = 1 Or_ CheckBox4.Value = 1 Or CheckBox5.Value = 1 Or CheckBox6.Value = 1 Then
Set pointobj = ThisDrawing.ModelSpace.AddPoint(ptpick) ThisDrawing.SetVariable "pdmode", 67 ThisDrawing.SetVariable "pdsize", 20 End If Restraint_apply_node.Show
End Sub
目的是进行选取点操作后,经判断复选框的选项是否被选上,若被选上,则把选取点改变形式。但此程序执行后,好像并不能执行if语句,也就是努能改变点的形式,这个原因是什么呀?请大家帮忙了!!! |