I select all entities via Editor.SelectAll() method, but the nested entities (inside Blocks) are missing. Do I have to resolve them by iterating through all blocks afterwards or is there a PromptSelectionOption that can be set?
I don't want the user to select the entities, instead I loop through the whole drawing.
If you are only interested in working with the BlockReferences or Inserts on a Layout, you could use SelectionFilters to select only those you want without going thru the entire Layout.
Have you searched for PromptNestedEntityOptions & PromptNestedEntityResult?
The nested entites are not missing you are just selecting objects that are a transformed representation of the containers of those objects.
If selecting Blockreferences returned the entites in the definition and you use Select.All() and had 200 blockreferences from the same BlockTableRecord then you would have 200 copies of the same ObjectId for each entity in the definition, or if selecting a polyline retuned all the vertexs, etc.....
Not sure what you are trying to accomplish but iterating through the returned ids you could create a collection and check if its ObjectClass points to a BlockReference and add the DynamicBlockTableRecord Id to the collection if it does not already contain it then do whatever needed to enities in definition.
Sorry for not beeing clear. I currently select entities by specifying certain criterias by predicates (using PredicateBuilder). In the first step I build a query like this: "Select all entities of type 'Circle' with XData 'MyEntitiyID' an layer 'L' ". And then I process this query with a method that iterates through all entities (via Editor.selectAll as start input) and check if the predicate matches. I want to iterate through all entities, but with Editor.selectAll I don't get the nested ones. I hope this makes it more clear.
Again: I don't want to prompt the user for selecting entities. The user starts specific commands that uses specific selection predicates.
What do you mean by nested entities?
Are you speaking of attributes of block references, or graphical entities (like lines, circles, polylines, etc.) that make up the graphical representation of each block reference ?
The acedSSGet method does not work with the combination of "nested" and "all" options. It is the same with the .Net selection methods.
You may try exploding the block references that you have obtained using SelectAll and then iterate through the DBObjectCollection to do the processing that you want. The exploded entities can then be discarded as they are not database resident.
A BlockReference does not contain its own set of nested entities. The entities you see that make up the geometry of a BlockReference are the entities in the block's definition (BlockTableRecord), transformed to the coordinate system of the block reference.
If you need to work with the entities for a given Block, transformed into the coordinate system of a given BlockReference, you can explode the BlockReference, and use the resulting copies of the entities from the block's definition, which are transformed to the BlockReference's coordinate system, and then Dispose() them without adding them to the database.