TheSwamp

Code Red => .NET => Topic started by: guohq on July 25, 2016, 12:42:00 AM

Title: how to add entity into selectionset?
Post by: guohq on July 25, 2016, 12:42:00 AM
how to add entity into selectionset then I can use SelectPrevious  method to select these entities next time.

SelectionSet.FromObjectIds  only return a selectionset .
Title: Re: how to add entity into selectionset?
Post by: MexicanCustard on July 25, 2016, 08:17:39 AM
Editor.SetImpliedSelection
Title: Re: how to add entity into selectionset?
Post by: guohq on July 25, 2016, 08:52:17 PM
Thank you .But Editor.SetImpliedSelection can not add entity to previous selectionset.
Title: Re: how to add entity into selectionset?
Post by: MexicanCustard on July 26, 2016, 07:17:02 AM
I guess I'm not understanding the question.  A SelectionSet at its core is just an ObjectId[]. So when you say add to a SelectionSet you just add the additional ObjectIds to an ObjectId[].  You can collect many SelectionSets combine them all into another ObjectId[] and set the current selection to this array using Editor.SetImpliedSelection. After setting the current selection, SelectPrevious will now pick the objects that were in your ObjectId[].
Title: Re: how to add entity into selectionset?
Post by: guohq on April 20, 2018, 11:15:49 AM
I find the anwser!

you can try like below


Dim IDSet  as SelectionSet = .......

Doc.Editor.SetImpliedSelection(IdSet)
Doc.Editor.GetSelection()

then ,you can  use  "P" when you select something