Page 1 of 1

Editor ImpliedSelection

Posted: Tue Dec 27, 2022 9:03 am
by DenisSilveira
Trying to keep SelectionSet to impleidselection after a command ends, but it is not retaining the selectionset.

Objects selected after simple command does not keep selected.

Is ther a way to set the PROPERTIES filter objects ?

<CommandMethod("CheckForPickfirstSelection", CommandFlags.UsePickSet)>
Public Sub CheckForPickfirstSelection()
'' Get the current document
Dim acDocEd As Editor = Application.DocumentManager.MdiActiveDocument.Editor

'' Get the PickFirst selection set
Dim acSSPrompt As PromptSelectionResult
acSSPrompt = acDocEd.SelectImplied()

Dim acSSet As SelectionSet

'' If the prompt status is OK, objects were selected before
'' the command was started
If acSSPrompt.Status = PromptStatus.OK Then
acSSet = acSSPrompt.Value

Application.ShowAlertDialog("Number of objects in Pickfirst selection: " &
acSSet.Count.ToString())
Else
Application.ShowAlertDialog("Number of objects in Pickfirst selection: 0")
End If

'' Clear the PickFirst selection set
Dim idarrayEmpty(0) As ObjectId
acDocEd.SetImpliedSelection(idarrayEmpty)

'' Request for objects to be selected in the drawing area
acSSPrompt = acDocEd.GetSelection()

'' If the prompt status is OK, objects were selected
If acSSPrompt.Status = PromptStatus.OK Then
acSSet = acSSPrompt.Value

Application.ShowAlertDialog("Number of objects selected: " &
acSSet.Count.ToString())
acDocEd.SetImpliedSelection(acSSet)
Else
Application.ShowAlertDialog("Number of objects selected: 0")
End If


End Sub

Re: Editor ImpliedSelection

Posted: Wed Dec 28, 2022 2:06 am
by QuanNguyen
Simply add the CommandFlags.Redraw to the CommandMethod,
It works as should be.

Code: Select all

 [CommandMethod("PFA", CommandFlags.Modal | CommandFlags.UsePickSet | CommandFlags.Redraw)]
Public Sub CheckForPickfirstSelection()
....
End Sub

Re: Editor ImpliedSelection

Posted: Wed Dec 28, 2022 9:49 am
by DenisSilveira
After command ends the selected objects does not keep selected ... it is released...

Re: Editor ImpliedSelection

Posted: Wed Dec 28, 2022 6:37 pm
by QuanNguyen
Here's the screenshot on IntelliCAD 11:
https://www.dropbox.com/s/peivwgjiiycpg ... d.mp4?dl=0

Re: Editor ImpliedSelection

Posted: Wed Dec 28, 2022 8:31 pm
by DenisSilveira

Re: Editor ImpliedSelection

Posted: Wed Dec 28, 2022 11:46 pm
by QuanNguyen
Hi Denis,
Sorry, it didn't work on IntelliCAD 10.0.
Please upgrade to IntelliCAD 11 to have the new features and improvements.
Regards.