Normally get elements by view should write as follow:
FilteredElementCollector coll = new FilteredElementCollector(m_document, view.Id).WhereElementIsNotElementType();
But I found if invoke this statement will consume so much memory as a result if loop every views to get elements will consume so much memory. But if I get elements by document as follow:
FilteredElementCollector coll = new FilteredElementCollector(m_document).WhereElementI sNotElementType();
it will consume almost no memory even I invoke it at every views. Anybody know why.
if it is bug. and I think I should get all elements by document firstly. then classify those elements by views. But now I don't know how to know which elements belong to (or are visibly to ) which views. It sees no method to classify it. Can anyone help me. thx
FilteredElementCollector coll = new FilteredElementCollector(m_document, view.Id).WhereElementIsNotElementType();
But I found if invoke this statement will consume so much memory as a result if loop every views to get elements will consume so much memory. But if I get elements by document as follow:
FilteredElementCollector coll = new FilteredElementCollector(m_document).WhereElementI sNotElementType();
it will consume almost no memory even I invoke it at every views. Anybody know why.
if it is bug. and I think I should get all elements by document firstly. then classify those elements by views. But now I don't know how to know which elements belong to (or are visibly to ) which views. It sees no method to classify it. Can anyone help me. thx
Comment