I have only an entry level understanding of proxies, so perhaps that lack of knowledge is the reason I can't find the proxy in the file attached in first post (there are hundreds).
As mentioned, I only know of two ways to identify a proxy object:
[Entity].IsAProxy and [objectId].Value.ObjectClass.Name == "AcDbZombieObject"
or one way in lisp:
(vlax-get obj 'ObjectName)
Alternatives? What to look for on an object?
My understanding is that a proxy is a proxy because the object enablers are not present. If the xml object type definition of a custom ARX object is present, then it is no longer a proxy object, therefore testing for a proxy is irrelevant as the object is no longer an AcDbZombieObject, rather the name of the actual object class. Also, if object enablers were present, then autocad would not be restricting a bind-insert on an xref, as the enabler would handle the operation (presumably). So in the .net example above, it does iterate the entire db in both model and layouts.
The only thing I'm not doing is iterating the block definitions, as I remember reading that autocad doesn't allow proxies to be inside the blocks themselves. Actually I read that in the source of
SuperFlatten. Even that being stated in the comments,
Joe still takes the time to cycle the block definition, as he states (line 296), it is
"very rare case since the block command does not allow proxies to bew included in a block definition". Who knows with ObjectARX?
While I was composing this, gile posted...
Coincidently, I was playing to this right now.
Here's where I am using .NET (work in progress inspired by this thread).
This thread also started my journey.
My only goal difference, is that I want to keep the primatives of any graphical object, if possible - so I use HandOverTo() for everything.
Question premise... I don't want any non-vanila acad data to get through. I noticed that you are using IsDerivedFrom. Property of IsAProxy evaluates false if object enablers installed for that object type.
Question... Will IsDerivedFrom RXClass.GetClass(typeof(ProxyObject)) return true even if object enablers for that object are installed?