Right Click->Cancel event exposure

Right Click->Cancel event exposure

nitinjambhale
Advocate Advocate
641 Views
4 Replies
Message 1 of 5

Right Click->Cancel event exposure

nitinjambhale
Advocate
Advocate

Hi All,

Is there is exposure for Mouse Right Click -> Cancel event from Revit API 2017 when i cancelled instead of Escape key?

 

For e.g. after any revit document change there is event like document_changed(),

so can i get something like document_Cancel() so that after right click->Cancel i should run my code.

 

I m able to track double escape but not Cancel from mouse click...

 

Please suggest.

 

Thanks,

-Nitin J.

0 Likes
642 Views
4 Replies
Replies (4)
Message 2 of 5

jeremytammik
Autodesk
Autodesk

Dear Nitin,

 

Nope, I am not aware of any such possibility.

 

If you really need it, you can probably implement that yourself using the .NET and Windows API.

 

I would not recommend it unless you have a really pressing need, though.

 

Cheers,

 

Jeremy

 



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

Message 3 of 5

Anonymous
Not applicable

Dear Nitin,

 

I explain you an important characteristic for Right click cancel or double ESC. Whenever any element in your mouse to place in revit document .
Revit idling event is stop working till you do not click Cancel or Double escape. So according to your application you can create your own logic to understand when cancel is Clicked or double escape.

 

Note: This approach is not worked when no element is on mouse to place.

0 Likes
Message 4 of 5

Mustafa.Salaheldin
Collaborator
Collaborator

Try to use a transaction then check its status or check the ControlledApplication.FailuresProcessing handler.


¯\_(ツ)_/¯
Let it work like a charm.

Mustafa Salaheldin


EESignature




Digital Integration Manager, DuPod

Facebook | Twitter | LinkedIn

0 Likes
Message 5 of 5

nitinjambhale
Advocate
Advocate

Thanks Jeremy, Bhova singh and mustafa for your suggestions, i will think more on this chapter later on...

 

Thank you guys.

0 Likes