Hi,
I made some tests sometimes ago and it appears that using Editor.SelectAll with a selection filter is not faster than iterating through the model and paper spaces, it is even a little slower when opening the entities is not required (i.e. only filtering entity types by ObjectId.ObjectClass).
..If you are working with the current db in the editor you could perhaps use a SelectionSet with PromptSelectionOptions.SelectEverythingInAperture to select all with a filter?
I'd assume that the iteration would be quicker though as you're not dealing with the Editor and SelectionSet code layers.
..If you are working with the current db in the editor you could perhaps use a SelectionSet with PromptSelectionOptions.SelectEverythingInAperture to select all with a filter?
I'd assume that the iteration would be quicker though as you're not dealing with the Editor and SelectionSet code layers.
Thanks for the reply MickD. A SelectionSet wouldn't work, because I'm looking for BlockDefinitions, not BlockReferences. Between your post and Gile's it seems that iteration is the way to go.