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: 

Creating assembly vs. AddingmeberIds

1 REPLY 1
Reply
Message 1 of 2
BardiaJahan
252 Views, 1 Reply

Creating assembly vs. AddingmeberIds

Hi all,

 

A section of my plugin iterates through some objects, and creates an assembly containing those passed a condition. I am wondering if, in terms of efficiency, there is a big difference between  1- retrieving the elements and creating the assembly at the end vs. 2- Creating the assembly and adding elements to it one by one in each iteration (using AddMemberIds method)?

1 REPLY 1
Message 2 of 2
sobon.konrad
in reply to: BardiaJahan

Are you able to post an example of your code. That way we can better asses what looks more efficient. Are you opening multiple transactions. Are you looping through the elements collection multiple times. etc etc. These are all questions we can't answer when you don't post a valid minimal example. 

Cheers! 

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