- 积分
- 764
- 明经币
- 个
- 注册时间
- 2004-6-17
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2005-6-9 17:52:00
|
显示全部楼层
Private Sub CommandButton6_Click() ' Begin the selection Dim basePnt As Variant Dim objatts As Variant Dim i As Integer On Error Resume Next '隐藏对话框 Me.Hide '以点选方式获取图元 ThisDrawing.Utility.GetEntity returnObj, basePnt, "Select an object" If returnObj.ObjectName = "AcDbBlockReference" Then 'returnObj.color = acRed 'returnObj.Update 'returnObj.color = acByLayer 'returnObj.Update ComboBox5.Clear ComboBox6.Clear ComboBox7.Clear ComboBox5.AddItem returnObj.Name ComboBox5.ListIndex = 0 objatts = returnObj.GetAttributes For i = LBound(objatts) To UBound(objatts) ComboBox6.AddItem objatts(i).TagString 'ComboBox5.AddItem objatts(i).PromptString ComboBox7.AddItem objatts(i).TextString Next i Else x = MsgBox("你选择的不是图块,请从新选择", vbOKOnly, "提示") End If Me.Show End Sub |
|