I agree they do and I had a look at the package nodes, but they fail to highlight the selection. The method they use is Select.PickObject(), which does the selection, saves the selection, but doesn’t keep the selection highlighted, which is the case of Select.PickObjects() method, the only issues with it is it doesn’t save the selection in order of selection/picking.
The three that I mentioned are python nodes, so you can see what they’re doing in the code to select and maintain object order. You should be able to combine that with Selection.PickObjects() to get what you want.
Exactly, I have done the same using Python, they have implemented the Selection.PickObject() method to select elements in correct order and save it, but it fails to highlight the selection, which is my requirement for selecting multiple elements.
Here is the implementation in Python,
sel1 = uidoc.Selection
obt1 = Selection.ObjectType.Element
msg1 = 'Pick elements in the desired order, hit ESC to stop picking.'
getDetailElements = []
get_rvt_Crvs = []
if(IN[0] == True):
flag = True
TaskDialog.Show("Detail Curves Selection", msg1)
while flag:
try:
el1 = doc.GetElement(sel1.PickObject(obt1, msg1).ElementId)
getDetailElements.append(el1)
except : flag = False
If any of the methods, or any other method, can do the job, it would really help.
It may be a difference in PickObject() and PickObjects(). The ordered nodes use PickObject() to iteratively pick multiple singular objects vs picking many objects at once. This allows them to build a custom list in the order the elements are selected but probably doesn’t highlight elements because it wouldn’t be necessary for a single object. Selecting multiple elements with PickObjects() would highlight the elements but likely returns a sorted list.
You can try to work around this but it may not be possible.
Thank you for the very good stuff!
It’s what I wanted!
Can you limit the categories to choose from?
For example, there is a UI to select a category (door or window),
and I want to be able to select only the chosen category.