0

In AutoCAD ObjectARX .NET wrappers, how would I expose virtual functions such as subWorldDraw(), so that they can be overridden by classes derived from the managed wrapper? I could call a proxy from the native method, but what about the AcGiWorldDraw argument?

  • Are you talking about rewrapping the c++ api? Or wrapping the .net API? If c++, then you would just Dll import and call the method. If you want wrap the .net API then you inherit, if not seals then overide, DLLs import and call the method you want. But be sure to utilize your object and not the AcObj. – Trae Moore Feb 22 '15 at 02:29
  • Below is part of the C++ code produced by the AutoCAD custom entity wizard. I have a .NET wrapper for this class the exposes this to .NET. Could you provide a code example of the wrapper code required for the below method? – Paul Coulson Feb 23 '15 at 08:16
  • //----- AcDbEntity protocols Adesk::Boolean AsdkSimplePoly::subWorldDraw (AcGiWorldDraw *mode) { assertReadEnabled () ; return (AcDbEntity::subWorldDraw (mode)) ; } – Paul Coulson Feb 23 '15 at 08:28
  • The wrapper is required so that I can override the method in C#. – Paul Coulson Feb 23 '15 at 08:32
  • Maybe you should rethink your implementation. if your doing what i think you are, you should just monitor for the command, veto and call your own. – Trae Moore Feb 23 '15 at 22:08
  • Its straight out of the AutoCAD wizard! I thought this would be a simple question to answer - looks like I might have to use an overrule instead but thanks anyway. – Paul Coulson Feb 25 '15 at 09:33

0 Answers0