Let's say you have your standard blocks contained in library files.
For setting up something to help with inserting them on a certain layer, you can add the layers to the library file that you want the blocks inserted on.
Then in the BlockTableRecords ExtensionDictionary add the Layers ObjectId using a HardPointer type code.
The layer gets cloned and for BlockReferences you can look in definitions ExtensionDictionary to get translated ObjectId of layer so it keeps its association.
For drawings that are meant to be inserted as blocks does anyone have an idea of a good way to map the layer during a 'Insert', assuming you add the layer or layers to drawing(and using your own logic to store ids and decide which one is appropriate for the condition). The layers get cloned for just being in the drawing, but not sure of a good way to recreate association when 'Inserted'.
During a Insertion the extensionDictionary values do not seem to get cloned with TreatElementsAsHard = true.
I tried using a ObjectOverrule and adding the layers ObjectId to the Blocks file ModelSpace's ExtentionDictionary, and the ExtensionDictionary of its DraworderTable & BlockBegins, but does not get cloned.
I did get something hackishly working with BeginDeepCloneTranslation event but doesn't feel right.
Or probably best to quit trying what I think might work and try to understand exactly what is happening, for starters during a 'Insert' does it kinda act like a deepclone where it opens the database of the drawing to be inserted and instead copying & translating the ObjectIds it just keeps the same ObjectIds and destroys the database leaving the objects in memory that are needed for the 'Insertion'?