Anuncios
Welcome to the Revit Ideas Board! Before posting, please read the helpful tips here. Thank you for your Ideas!
cancelar
Mostrando los resultados de 
Mostrar  solo  | Buscar en lugar de 
Quiere decir: 

Temporarily Disable Model Regeneration in the API

Temporarily Disable Model Regeneration in the API

There are certain API function calls that cause Revit to regenerate views, even in the middle of a transaction.  When performing certain actions on a large number of items in a large model, the regeneration can cause the program to run hundreds of times more slowly than if the regeneration of all views could be forced off until the end of a transaction.

8 Comentarios
conoves
Autodesk

Do you have examples of the API calls which do this that cause you the most slowdown?  (I know of a few such documented calls, but I'm not sure if you are referring to one, some or all of them or to others that are not even documented).

 

Anonymous
No aplicable
Viewport and Sheet locations always cause a regeneration so dealing with
lots of them takes a long time. the ".BoundingBox()" function of a
viewport will cause regeneration and the ".Outline.Max.U" or any .outline
function of a sheet element will also cause regeneration.
I know I have come across a few others, but those would be a good start.
conoves
Autodesk

Thank you for the examples.   It is not regeneration in the sense of Document.Regenerate() happening for those calls, but rather update of the elements and the geometry needed to show in the view.    Some operations need to update the view the first time and should be faster after that.  Others might need to recalculate each time. I'm guessing by your report you are finding that these operations are recalculating every time?

 

Please note one workaround for View.Outline - call this once and set it into a local variable, instead of accessing .Outline.Max.U, .Outline.Max.V, etc. This should help avoid multiple recalculations of the outline in the same call sequence.

 

Anonymous
No aplicable

Thanks for the the clarification.  The view.outline call only take a long time the first time it is used for each viewport, The problem is when you have 4000 of them, it takes a very long time.  It seems like there should be a more efficient way to retrieve the information without waiting for it to update the elements and geometry for each view/sheet/viewport.

On the note of regeneration, there are other commands that seem to cause regeneration.  One more that I can remember was 

TextNote.ChangeTypeId(TextTypeID) .  That one seemed to be intermittent, but it would cause a regeneration and slow down the process.  I may remember others at some other time.

sasha.crotty
Community Manager
Thanks for taking the time to submit your idea. Unfortunately, this idea did not get the support of the community over the last 6 months and as such we will not be pursuing it at this time. Please feel free to rework (titles and clear descriptions are really important) and resubmit this one down the road.
sasha.crotty
Community Manager
El estado se ha cambiado a: Archived
 
adriantagayom
Community Visitor

this would absolutely be good if implemented

adriantagayom
Community Visitor

i support this. would definitely make automation workflow MUCH MUCH faster

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

Enviar idea  

Autodesk Design & Make Report