As of AutoCAD 2010 (or later only?), if I have a custom object defined by a loaded DBX (so not a proxy), it is described as being of type _ComObject. I understand why, but I wonder, is it possible yet to be able to access its true type (e.g. MyCustomObjectType) and read / write its [custom] properties and / or call its custom methods from .NET? I suspect that even if the methods were available in the COM wrapper class (the same one used to produce the entries in the Property Inspector for the object) it still might not be possible. I found some old articles but they were no later than 2009 and only talked about Overrules (if that's the right term) - but I don't just want to override certain behaviour. I would like to be able to create and manipulate custom objects as if they were built-in objects - so the DBX defines what they are and what they do, and the .NET side actually does the work by setting properties or calling methods - just like it would for a standard object.
You can access a custom object from .NET if the creator of that object has provided a .NET wrapper for it.
You can access a custom object from COM if the creator of that object has provided a COM wrapper for it.
You can access a custom object from C++if the creator of that object has provided C++ headers and libs for it.
Many custom object developers do provide .NET wrappers, so its worth asking the developer of the custom objects you're using.
Also, if a custom object is derived from (say) a Line, then you can cast that object to be a Line class and access that level of methods and properties. But you can't access the methods/propoerties added in the derived class without the wrapper.
It will be us creating the custom object, so we have full control of what it exposes. Can you point me to any tutorials on how to create a .NET wrapper for a custom object, if possible, please? I'd like to explore this option.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register