Inventor Customization

Valued Contributor
Posts: 50
Registered: ‎09-18-2006
Message 1 of 2 (212 Views)

2013: Automation Error

212 Views, 1 Replies
11-16-2012 11:44 AM

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?



ADN Support Specialist
Posts: 1,263
Registered: ‎06-12-2011
Message 2 of 2 (171 Views)

Re: 2013: Automation Error

12-17-2012 11:47 PM in reply to: Allen_Hart



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?

Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community

Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor