代码如下: Sub ppcolor() 'color select dialog Dim ppentity As AcadEntity Dim ppset As AcadSelectionSet Set ppset = ThisDrawing.SelectionSets.Add("mmmm") ppset.SelectOnScreen ppset.Delete Set ppset = Nothing Dim xxx1 As Integer
xxx1 = ThisDrawing.Utility.GetInteger("输入需要改变实体颜色的序号:")
Dim gggppp As Double If xxx1 = 1 Then gggppp = acRed ElseIf xxx1 = 2 Then gggppp = acBlue Else gggppp = acCyan End If For Each ppentity In ppset
ppentity.color = gggppp Next ppentity
End Sub
|