I made a product configurator in Unity3D.
I want the Windows version of my configurator to communicate with Autodesk Inventor to make production drawings of the configured product.
I made a DLL file and use it as a plugin in unity:
namespace InventorInterface
{
public class InventorConnection
{
private Inventor.Application InventorApplication;
public InventorConnection()
{
InventorApplication = System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application") as Inventor.Application;
}
public String FileName()
{
if (null != InventorApplication)
{
return InventorApplication.ActiveDocument.File.ToString();
}
return "Not Connected to Inventor!";
}
}
}
My Script in Unity looks like:
public class InventorConnection : MonoBehaviour {
// Use this for initialization
void Start () {
InventorInterface.InventorConnection Connection = new InventorInterface.InventorConnection ();
string File = Connection.FileName ();
}
}
But when I run my project I get this message:
NotImplementedException: The requested feature is not implemented. System.Runtime.InteropServices.Marshal.GetActiveObject (System.String progID) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs:317) InventorInterface.InventorConnection..ctor () InventorConnection.Start () (at Assets/Scripts/Inventor/InventorConnection.cs:10)
How can I get this to work?