Override Finish button after selecting the elements

Override Finish button after selecting the elements

Anonymous
Not applicable
566 Views
3 Replies
Message 1 of 4

Override Finish button after selecting the elements

Anonymous
Not applicable

Hi Team,

 

How to flick Finish button dynamically through c# code? . I need to automate the finish button instead of user click on the finish button in my addin. Any suggestions will be helpful. I am using wpf  to implement the addin.

 

raghavendrakurumeti_0-1633417910131.png

 

0 Likes
567 Views
3 Replies
Replies (3)
Message 2 of 4

zefreestijl
Advocate
Advocate

Hi, I've the same question,

is it possible to finish selection automatically same as picking a single object?

or how can we override the button with pressing Enter or Spacebar?

 

Plus, is it possible to make API automatically discard the current select session to start a new function without pressing Escape first?

 

Thanks in advance :]

0 Likes
Message 3 of 4

guillain.jolivet
Contributor
Contributor

I don't think you can, because you are doing a multiple selection and Revit can't know when your uiselection is over. It's the same as moving function, once you've selected all your elements, you have to press 'Enter'.

 

Maybe there is a command in PostableCommand Enumeration, but i've tried to make something like this a little while ago and found nothing...

0 Likes
Message 4 of 4

guillain.jolivet
Contributor
Contributor

You can set a new empty selection :

List<ElementId> elementIdList = new List<ElementId>();
uidoc.Selection.SetElementIds(elementIdList);

 

0 Likes