« New Revit 2013 SDK Samples | Main | Migrating VSTA Macros to SharpDevelop »

April 02, 2012

Comments

Hi Jeremy,

I am using Revit 2013. Default and Nondefault Idling modes are taking more time than in revit 2012 idling.Is any other way to improve performance.

Thanks,

Dear Sangsen,

That sounds interesting. Can you prove that? How?

The best thing to do would be for you to submit an ADN DevHelp Online case for this so that we can examine it in more depth.

If you are not an ADN member, please send me a minimal reproducible case by email.

To answer your question: yes, you will probably get optimal performance by converting your code to use an external event instead of the Idling one.

Cheers, Jeremy.

Hi Jeremy..

Thanks for your response jeremy.

I found something. Project with Idling in Debugmode only revit takes time to perform any action. In release mode revit works fine. Please help me ..

Thanks

Dear Sangsen,

Glad to hear that it works fine in release mode.

I do not understand at all what problem you are having in debug mode.

I checked with the development team, and we are not aware of Idling being slower.

The older non-default mode should be virtually the same as before.

The new mode will naturally be slower, because it will respond to real idling (system Idling) event, which is not always triggered even when the end user is seemingly not doing anything. Therefore, the MultiThreading/WorkThread work-thread analysis SDK sample uses the old Idling mode.

The original internal implementation has stayed virtually untouched.

Now, when you say 'taking more time', does that mean it is not triggered as often, correct? Or is it something else?

Also, when you ask me for help, what on earth would you like me to do?

I can pray for you, but I cannot change the internal implementation of Revit :-)

Maybe you are just observing some side effects of your debugging process, which ave nothing to do with Revit at all...

Cheers, Jeremy.

Hi Jeremy,

I'm having a problem with using the idling event, a strange think is happening and I don't understand way, maybe you can help me.

What I'm doing is, from inside the idle event I duplicate a symbol and then I use it to create a instance of it, everything works, there is no error, no exception, but when I check the result in Revit I see that the instance, witch is a MEP family, doesn't have the connector.

I did a debug on the code and I discover that the instance that is created have a null MEPModel.ConnectorManager.

This means that the Duplicate method is not working correctly during idle event or I am doing something wrong?

If I do the same thing in a command then the connector is there.

Thank you.

Dear Claudiu,

Thank you for the report. It makes sense, potentially, although I have not heard of any similar issue before.

There could always be an error in your code, or in the Idling event behaviour, hard to say. We would need a reproducible case to test, i.e. a minimal sample model plus one-click compile-and-install Visual Studio sample app to test this.

You are of course aware that you may have to regenerate or commit the transaction before the connector manager is fully initialised?

http://thebuildingcoder.typepad.com/blog/2010/06/to-regenerate-or-not-to-regenerate.html

http://thebuildingcoder.typepad.com/blog/2010/11/setting-text-width-requires-regen.html

If that does not help and you are an ADN member, please submit an ADN DevHelp Online case for us to explore.

Cheers, Jeremy.

Neither the ModelessForm_ExternalEvent sample project, nor the ModelessForm_IdlingEvent project work when you are viewing a 3d perspective view. Is there a solution to this pls?

Dear Paul,

What you observe is absolutely expected.

The Revit API is disabled in perspective views:

http://thebuildingcoder.typepad.com/blog/2009/06/rfa-version-grey-commands-family-context-and-rdb-link.html#2

Cheers, Jeremy.

Hi Jeremy,
I have a problem using DetachFromCentralOption with OpenAndActivateDocument.

It returns an exception: "The file-based central model could not be reached, because e.g. the network is down or the file server is down".

Of course it cannot reach the central server, I want to detach from central. I can open the file manually and detach from central. Do you have any idea?

Code:

OpenOptions opt = new OpenOptions();
opt.DetachFromCentralOption = DetachFromCentralOption.DetachAndPreserveWorksets;
opt.AllowOpeningLocalByWrongUser = true;
app.OpenAndActivateDocument(modelpath, opt, false);

Thanks,
Christian

Dear Christian,

Nope, sorry, I do not know what might be going wrong.

If it works manually, performing the exact same step programmatically should work.

Have you tried minimalising your code even further still, to ensure that you are not inadvertently toggling some option that requires access to the server?

Maybe eliminate all option settings except the DetachFromCentralOption one?

Is the model path independent of central?

All I know is this, which seems to indicate that it should work:

http://thebuildingcoder.typepad.com/blog/2012/10/detach-workset-and-taskdialog-command-link-order.html

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