Author Topic: call a .net Method from arx with  (Read 1307 times)

0 Members and 1 Guest are viewing this topic.

bikelink

  • Guest
call a .net Method from arx with
« on: January 10, 2016, 02:10:45 AM »
Hello world... since a long time I had no project in autocad.. but now I have it one... and i restart with a little trouble.
this is a simple code with standard params.. and it's run ok

             
Code: [Select]
    IAdeoSharp  *cpi = NULL;


// Initialize COM and create an instance of the InterfaceImplementation class:
CoInitialize(NULL);

HRESULT hr = CoCreateInstance(CLSID_CAdeoSharp,
   NULL, CLSCTX_INPROC_SERVER,
   IID_IAdeoSharp, reinterpret_cast<void**>(&cpi));

CString out("");
BSTR xmlData = out.AllocSysString();
CString fistr("");
BSTR bfistr = fistr.AllocSysString();
bfistr =m_Parametri.ObjDbConn.m_StringaConnessione.AllocSysString();
             hr = cpi->MethodNET(&bfistr,&xmlData);



Now I would be able to use an AcDbVoidPtrArray as parameters or AcDbentity. How can I work and use any autocad object as parameter  ?

MethodNET(&bfistr,&xmlData); substantially, how must i declare the parameters ?

Thanks in advance