« Matt Mason's API News | Main | Asynchronous API Calls and Idling »

April 26, 2010

Comments

Jeremy,

By reading your explanation (very detailed by the way, thanks) I was thinking about the following scenario:

- The user is working within Revit performing general commands
- From time to time he stops and make Revit enter into an idle state for a moment
- At this moment I expect Revit to fire the Idling event
- My Revit plugin captures the idling event
- It gets control of Revit and perform some process, say a quick select over some families and collect some parameter information (it should be quick)

My questions in this scenario would be:

1)How Revit will react if the user tries to fire some command during my idling process? Do I need to handle this possibility?

2)Can I lock the Revit UI during this idling process?

3)Any special Transaction management in this scenario?

Regards.

Dear Fernando,

Thank you for your appreciation, I am glad you like it.

I have no idea what the answer is, although I suspect that a lot of thought and care has been given to these issues by Arnost and his colleagues as described in

http://thebuildingcoder.typepad.com/blog/2010/04/asynchronous-api-calls-and-idling.html

If you want to write to the Revit database in your Idling handler, you have to open a transaction. That will probably lock Revit and its UI in the manner you intend.

Try it out and let us know what you find out.

Cheers, Jeremy.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)

Jeremy Tammik

AboutTopicsIndexSource