Get refrence to Inventor application with Mono

Get refrence to Inventor application with Mono

Anonymous
Not applicable
337 Views
1 Reply
Message 1 of 2

Get refrence to Inventor application with Mono

Anonymous
Not applicable

Hi,

 

I've made kind of product configurator in Unity3D.

Now I want the windows version of this configurator to communicate with Inventor.

 

My first attempt was:

Inventor.Application InventorAplication = System.Runtime.InteropServices.Marshal.GetActiveObject ("Inventor.Application");

But Unity uses Mono and if you take al ook in the Mono sourcecode:

 

public static object GetActiveObject (string progID)
     {
         throw new NotImplementedException ();
     }

 

I also tried this:

Inventor.Application InventorAplication = System.Diagnostics.Process.Start ("C:\\Program Files\\Autodesk\\Inventor 2016\\Bin\\Inventor.exe");

But I didn't manage to get the casting right.

 

 

Does anyone know if or how its possible to get a reference to an Inventor application with Mono?

338 Views
1 Reply
Reply (1)
Message 2 of 2

wayne.brill
Collaborator
Collaborator

Hi,

 

I can confirm that that the only way to connect to a session of Inventor is through the COM interface. If Mono does not have that then it would need to be implemented or another approach would need to be found.

 

This call seems like this call is just using the .NET API and could work. 

System.Runtime.InteropServices.Marshal.GetActiveObject ("Inventor.Application")

 

This is a common call as seen in this DevBlog post however as I no nothing about Mono I am not sure if the GetActiveObject .NET method cannot be used.

http://adndevblog.typepad.com/manufacturing/2013/09/run-ilogic-rule-from-external-application.html

 

Thanks,

Wayne



Wayne Brill
Developer Technical Services
Autodesk Developer Network

0 Likes