ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

using ObjectARX in an out of process program

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
286 Views, 2 Replies

using ObjectARX in an out of process program

Hi All,

I am trying to use ObjectARX in an out of process automation program using vb.net 2005. The automation program opens an instance of Autocad in the background and presents the user with a GUI.

I added the references
C:\Program Files\AutoCAD 2009\acdbmgd.dll
C:\Program Files\AutoCAD 2009\acmgd.dll
and set both to copy local = false.

On my main form I added a button for testing:
Dim ed As Autodesk.AutoCAD.EditorInput.Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor
ed.WriteMessage("\nSheetset database not initialized!!")

It compiles and runs but when I click the bottun, I get a file not found exception with something like:
'acmgd, Version=17.2.0.0, Culture=neutral, PublicKeyToken=null'

Can help me resolve this problem? Any help is appreciated


-Vincent
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

You can't use ObjectARX (native or managed) from another process.

It's use is limited to DLLs that are loaded into AutoCAD's process.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

wrote in message news:6047881@discussion.autodesk.com...
Hi All, I am trying to use ObjectARX in an out of process automation program using vb.net 2005. The automation program opens an instance of Autocad in the background and presents the user with a GUI. I added the references C:\Program Files\AutoCAD 2009\acdbmgd.dll C:\Program Files\AutoCAD 2009\acmgd.dll and set both to copy local = false. On my main form I added a button for testing: Dim ed As Autodesk.AutoCAD.EditorInput.Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor ed.WriteMessage("\nSheetset database not initialized!!") It compiles and runs but when I click the bottun, I get a file not found exception with something like: 'acmgd, Version=17.2.0.0, Culture=neutral, PublicKeyToken=null' Can help me resolve this problem? Any help is appreciated -Vincent
Message 3 of 3
Anonymous
in reply to: Anonymous

actually I found that you can, in a way. You have to make a DLL that uses ObjectARX and use COM to expose those functions/classes to out of process programs. You also have to get a pointer to the DLL through Autocad using GetInterfaceObject to load the dll into Autotocad's in-process space.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost