How to query information from Revit while it is in transaction mode.

quang.nguyenrauchanvit
Explorer
Explorer

How to query information from Revit while it is in transaction mode.

quang.nguyenrauchanvit
Explorer
Explorer

I have an external event that call GetZoomCorner() every second and send that information to my application. However, when Revit enters transaction mode(e.g., as shown in the picture where I am drawing a grid, Revit enters transaction mode), the external event stops working because the Revit main thread is busy. Is there a way to fetch information even when Revit is busy?

quangnguyenrauchanvit_1-1733080405845.png

 

 

 

0 Likes
Reply
Accepted solutions (1)
151 Views
2 Replies
Replies (2)

scgq425
Advocate
Advocate

Hi @quang.nguyenrauchanvit :

use the idling event to put you operation when revit is not busy in thread .

this is a page to introduce and set a sample code to use it 

Replacing an Idling Event Handler by an External Event 

LanHui Xu
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes

ricaun
Advisor
Advisor
Accepted solution

There is no way, if Revit is busy you need to wait the command to finish.

 

Both Idling and External Event does not trigger when Revit is busy running a command.

 

I wonder why you need to fetch Revit each second.

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes