Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

External Events from Dockable Pane

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
nitinjambhale
990 Views, 3 Replies

External Events from Dockable Pane

Hello All,

Can we Raise external events from dockable pane via Revit API 2017 API?

Please suggest.

 

Thanks,

Nitin J.

 

3 REPLIES 3
Message 2 of 4

Yes, you can.

 

You can raise an external event from anywhere at all.

 

Please take a look at the relevant SDK samples: ModelessDialog/ModelessForm_ExternalEvent and DockableDialogs.

 

They demonstrate all you need to know.



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 4

Thanks jeremy, that's meets my requirement. 🙂

Message 4 of 4
Anonymous
in reply to: jeremytammik

hello jeremy,

I have some problems while using the dockable pane.

 

    I have buttons in the dockable pane, and these buttons are designed to raise the external events, in which  the UIDocument.Selection.PickObjects() method or other methods that require the UI interation of the activeDocument are invoked. But an InvalidOperationException is raised every time when calling the PickObjects() method, with the error message: The active view is non-graphical and does not support capture of the focus for pick operations. In the debugging, I checked the (uiDoc.ActiveView.Id.IntegerValue == uiDoc.ActiveGraphicalView.Id.IntegerValue) before the PickObjects() method, and i t returned true every time.

 

    To resolve this problem, I used the WPF Window as an alternative, and raised the External Events to handle the PickObjects operation. This worked fine and no exception was raised.

    However, I still want a solution in the dockable pane, do you have any clues why that exception would be raised in the dockable pane, or you could give me some advise to have this exception skipped.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report