Your managed wrapper class must have the the
[Autodesk::AutoCAD::Runtime::Wrapper] attribute
(which specifies the native C++ class name of the
custom object class that is being wrapped).
Additionally, when the DBX housing your native
custom object class is loaded, it must instantiate
an array of AcMgObjectFactory<> instances which
what actually creates the wrapper instances.
See polysamp\managed\main.cpp in the SDK samples
for an example of the latter.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
wrote in message news:5490128@discussion.autodesk.com...
I created a custom DBX entity, and a managed C++ wrapper. I can use my managed wrapper to create instance of my custom entity from .NET. However, when I get back my instance via the object id, the .NET runtime type isn't that of my custom managed wrapper, but that of the parent (AutoCAD) class. How can I make sure an object id or AcadObject is really of a certain custom class and then attempt to transform it to one?
I'll appreciate any hints. Thanks.