2025 Selection.PickObjects Missing the Finish/Cancel buttons

2025 Selection.PickObjects Missing the Finish/Cancel buttons

jcbrown_symetri
Explorer Explorer
344 Views
2 Replies
Message 1 of 3

2025 Selection.PickObjects Missing the Finish/Cancel buttons

jcbrown_symetri
Explorer
Explorer

When calling Selection.Pickobjects the Finish and cancel buttons are missing from the options bar.

 

This is occurring when making the call from a modeless dialog, meaning after the command class execution method has finished and the dialog has displayed. When clicking a button to invoke the selection method the options bar does not display.

 

Has anyone else seen this?

 

It's behaving as if the options bar doesn't display outside of the command context. 

 

The basic steps to reproduce would be to show  a simple MODELESS dialog with a button that invokes UiDocument.Selection.PickObjects() and see if the buttons are there.

 

In my view model in 2023/2024 I'm able to fire the selection method and the buttons show. In 2025 they do not. I've tried using an external event as well but it does not work.

 

We use this programming pattern many places in our codebase and this will be rather unfortunate if there has been a change to the API and the behavior of the options bar in 2025

 

 

0 Likes
Accepted solutions (1)
345 Views
2 Replies
Replies (2)
Message 2 of 3

ricaun
Advisor
Advisor
Accepted solution

You could share an image, but I suppose the button was moved to the Ribbon.

ricaun_0-1718147249343.png

 

When you execute Selection.PickObjects using ExternalEvent a the button appear in the Ribbon instead of the Options bar.

 

Here is the main reference of the weird selection Ribbon menu in Revit 2025.

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes
Message 3 of 3

jcbrown_symetri
Explorer
Explorer

Wow that is pretty wonky. The modify tab usually highlights or otherwise activates by default. Looks like we will have to find a way to activate that manually or our users will most likely be confused as we were!

 

For those wondering how it's done, to activate a specific ribbon tab by name :

 

 

var ribbon = adWin.ComponentManager.Ribbon; //adWin is imported using adWin = Autodesk.Windows
ribbon.ActiveTab = ribbon.Tabs.First(t => t.Title.ToLower() == "modify");

 

 

In this case we can safely use .First() because we KNOW there is a modify tab. In other cases you will want to set a var and use FirstOrDefault and check for null before setting the active tab to the var.

0 Likes