Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Memory consumbtion

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Moustafa_K
446 Views, 1 Reply

Memory consumbtion

OpenDocumentFile Method  vs OpenAndActivateDocument Method  

 

Which of both consumes more memory...?

 

i have written an upgrade Addin and used OpenDocument as there is no need to make the document visible to the user. However, i can't figure which of both are more convinient to such rotuine.

 

any ideas?


-----------------------------------------------------
Moustafa Khalil
1 REPLY 1
Message 2 of 2
arnostlobel
in reply to: Moustafa_K

We have not performed any true comparisons between the two methods, but as memory consumption goes I would expect the DB method to require less memory, since some of the UI components are not created and/or initialized for non-UI documents. However, I would also expect the difference be ignorable (percentage-wise) on anything but small documents. From that point of view, I would not make it the decision driving reason. Whether to use the DB method or the UI method (OpenAndActivate) should be driven by purpose of the add-in. If there is no other UI involved, I would definitely prefer to use the DB version (OpenDocumentFIle). Not only it is going to be slightly faster, but it is guaranteed to work regardless of whether or not Revit operates with its UI present or without. That is naturally only true if the addin is implemented as a ExternalDBApplication (i.e. not regular ExternalApplicatio which always requires UI).

Cheers

Arno?t
Arnošt Löbel

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community