Community
Using Inventor VBA to test access to the company database by setting a reference to a custom dll,
Public mySO As SAFDrawingTools2.ShopOrderInfo Public Sub TEST_SO() RetrieveShopOrder (CInt(23851)) End Sub Private Sub RetrieveShopOrder(ByVal oOrder As Integer) Set mySO = New ShopOrderInfo
' FOR SOME REASON, THIS DOES NOT GET SET. ' Watching the VBA ERR object during debug, it shows ' Err.Number as -2146233079 ' Err.Description as "Automation error" ' Err.HelpContext as 1000440 ' But the run does not halt with an error message. ' Execution continues happily on to the next line. mySO.Retrieve (oOrder)
' This throws the Object Not Set error ' because mySO is set to nothing. End Sub
This same custom dll worked great in Autocad VBA, and still does using dot net for Autocad.
Also works fine using Excel VBA.
Inventor not so much.
What is this error?
I can't find any help for it. What is the trick to make this work in Inventor?
thanks
Allen
Hi,
Without looking at the source code of SAFDrawingTools2, I do not think anybody here would have a comment on the question because the code snippet you provided does not tell any information how to address the issue. could you try to isolate SAFDrawingTools2 and provide a small, buildable, reproducible sample?