|
发表于 2019-6-7 18:43:00
|
显示全部楼层
Public Sub CreateSelectionSet(SeleObjects As AcadSelectionSet, Name As String)
On Error Resume Next
If Not IsNull(ThisDrawing.SelectionSets.Item(Name)) Then
Set SeleObjects = ThisDrawing.SelectionSets.Item(Name)
SeleObjects.Delete
End If
Set SeleObjects = ThisDrawing.SelectionSets.Add(Name)
End Sub
==========================================================
Public Sub HideSelect()
Dim SeleObjts As AcadSelectionSet
CreateSelectionSet SeleObjts, "Seleobjts": SeleObjts.SelectOnScreen
On Error Resume Next
Dim Objt As AcadEntity
For Each Objt In SeleObjts
Objt.Visible = False
Next Objt
ThisDrawing.Regen acAllViewports
End Sub |
|