Apprentice Server COM Exception with Inventor 2015

Apprentice Server COM Exception with Inventor 2015

RonaldDold1034
Explorer Explorer
597 Views
4 Replies
Message 1 of 5

Apprentice Server COM Exception with Inventor 2015

RonaldDold1034
Explorer
Explorer

Hi,

 

i have some sample code from the Mod The Machine Blog, which runs on Inventor2012 without problems,  but with Inventor 2015 it throws an exception.

I have no idea whats going wrong.

 

(Code from: http://modthemachine.typepad.com/my_weblog/2013/09/working-with-cameras-part-2.html)

Private Sub CreateImage( _ 

              Apprentice As Inventor.ApprenticeServerComponent, _
              PartOrAssembly As Inventor.ApprenticeServerDocument, _
              Filename As String)
   ' Create a new camera.
   Dim cam As Inventor.Camera
   cam = Apprentice.TransientObjects.CreateCamera

   ' Associate the document with the camera.

   cam.SceneObject = PartOrAssembly.ComponentDefinition

 

This last line throws a  "System.Runtime.InteropServices.COMException"

I know that this have worked with Inventor 2012 as i have build a small "Snapshot" App with this code.

 

Any Ideas?

 

0 Likes
598 Views
4 Replies
Replies (4)
Message 2 of 5

adam.nagy
Autodesk Support
Autodesk Support

Hi Ronald,

 

It does seem to be an issue 😞 and so I have logged it in our system, #110672

 

I cannot think of a workaround other than using Inventor (e.g. in the background)

 

Cheers,



Adam Nagy
Autodesk Platform Services
0 Likes
Message 3 of 5

sverduyn
Contributor
Contributor

It seems this is still a problem with Inventor 2017, Catastrophic Failure when you try do the above!!

0 Likes
Message 4 of 5

adam.nagy
Autodesk Support
Autodesk Support

Hi,

 

Unfortunately, it seems this has not been sorted yet 😞

 

I'll try to raise the priority on this.

 

Cheers,



Adam Nagy
Autodesk Platform Services
0 Likes
Message 5 of 5

sverduyn
Contributor
Contributor

Thanks, fortunately I can run inventor silently and then use the camera object, not ideal as I want to run it on the vault server!!

0 Likes