Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is this a bug with the Inventor API?

1 REPLY 1
Reply
Message 1 of 2
dbrblg
218 Views, 1 Reply

Is this a bug with the Inventor API?

I use the following code to get an instance or create an instance of Inventor:

    Set oINVApp = GetObject(, "Inventor.Application")

    If (err) Then
        err.Clear
        Set oINVApp = CreateObject("Inventor.Application")

        Do While (Not INVReady)
            Sleep (1000)
            DoEvents

            If (oINVApp.Ready) Then
                INVReady = True
                Sleep (2000)
            End If
        Loop

    End If

 The problem I have is that Inventor has a tendency to crash.  Quite often Smiley Mad

For some reason oINVAPP is still linked to something, though I don't know what.  Whatever I do to the oINVAPP object, just happens and my code believes it has happpened as expected.

 

I need somehow to detect that oINVAPP is no longer an instance of Inventor.  If I test oINVAPP for Nothing it returns false, so something is going on. Firstly is this a bug?  Surely if this has crashed then something ought to be cleared??

Secondly, and more importantly, how can I detect this?  If I can't test oINVAPP for being nothing, what can I do to determine that Inventor has crashed?

 

Any help is appreciated.

 

1 REPLY 1
Message 2 of 2
adam.nagy
in reply to: dbrblg

Hi,

 

I don't think these sort of issues would be specific to Inventor, but could be reproduced with other applications registering themselves in the Running Object Table, like all the MS products.

 

So you debug into the code which is controlling Inventor and none of the functions on it set the Err object?

Did you check if another instance of Inventor maybe still running in the background that your Inventor.Application object is connected to? - when you create an Inventor.Application object it's kept invisible by default.

Maybe the crashed application is still registered in the Running Object Table (ROT) for some reason. You might find some viewers on the net which can help you with that. But then I think calling any functions on the object would return an error since they cannot communicate with the program.

 

Cheers, 

 

  



Adam Nagy
Autodesk Platform Services

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

Post to forums  

Autodesk Design & Make Report