Block edit behaviour

Hi everybody,

monitoring the events in Rhino I discovered that, when I double click on a block and I open the block edit panel, a lot of OnAddObject events are raised. Then when I close the panel those object are destroyed. Nothing is visible in the GUI but I think these are the objects that are part of the Instance definition of the block.
My issue is that I monitor all the objects added in the document and I would like to filter the objects that are not added to the document and that are not visible.
I would like to know what happens and what is the logic involved but and also a way to identify these objects in order to skip them. Any idea?


The block editor does the following:

  • Locks all not currently locked objects and tags them
  • Hides the block instance being edited
  • Reads the block definition geometry and duplicates it applying the block instance transform and adds it to the document

When the editor is closed it updates the block definition and deletes any temporary geometry. OnAddObject will get called when making the temporary geometry or when navigating the block tree in the block edit UI. The above steps are performed each time a new block is selected in the tree to allow editing nested blocks.