I am still not following completely on why does it have to be changed during a modified event rather than doing it during insertion or creation.
Are you trying to keep people from modifying a entity or during modifying set all properties?
Perhaps I can clarify... I don't need to do anything during Database.ObjectModified per-se, what I do need to do is to modify specific entity types if they're modified by the user, specifically without depending on a Command Event (i.e., a user selects an MLeader and changes it's layer via Properties Palette).
When doing this, there are only two Database Events that are raised, ObjectOpenedForModify, and ObjectModified... Since I cannot effectively employ UpgradeOpen() within ObjectModified (as the DBObject is no yet Closed), I am forced to store the desired ObjectIds to an ObjectIdCollection, then handle them after the fact.
As I am sure most companies do, we have different text hights/styles (Small, Medium, Large, etc.) and we place them each on specific layers. I often copy a label and manually place it on another layer... It's at this point that I want my plug-in to
automagically correct the necessary 'standards' for that entity type when I change it's layer (based upon my XML settings for that particular layer), without the need for running a supplementary custom Command, let alone the Standards Command prior to drawing close.
This would allow for me to catch/filter/enforce these pseudo-annotation standards on the fly, including vanilla, LISP Commands, etc., and further, easily allow me to quickly customize a new 'standard' for each Client as needed, as the XML settings are loaded via valid FindFile() result.
I've got EnteringQuiescentState working to a point, but need more time to work out how to better manage the ObjectIdCollection handling to ensure that handled ObjectIds are in fact removed properly... Still working through the logic (on my part)... Checking for Contains(id), etc., and wanting to compare EnteringQuiescentState to ObjectClosed at entity level (for my own edification, and learning purposes), etc, etc..