Inventor 2013 Error Report

Inventor 2013 Error Report

Anonymous
Not applicable
851 Views
4 Replies
Message 1 of 5

Inventor 2013 Error Report

Anonymous
Not applicable

Hi,

 

 I'm creating a customized program in Inventor 2011 using VBA. When I try to use my customize program from Inventor 2011 to Inventor 2013, an error report will occur and cause to terminate Inventor program. But when I try to debug program by line, the error report would not occur. I don't know what the cause of the problem. Does anyone have tried this problem. Please give me an advice.

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

xiaodong_liang
Autodesk Support
Autodesk Support

Hi,

 

without a reproducible sample, it is hard to give a comment, but what I have on my top my head is:

 

In default, to run in debug, the relevant lib/dll are available, and VS can find it e.g. the system variable specifies where the lib/dll locate.

 

while the problem with release version would be the relevant lib/dll (release mode) cannot be found/loaded. or some dlls which are delay loading cannot be loaded in release mode for some uncertain reason.

 

In a word, this would be an issue of module (lib/dll) loading. What I can suggest is to monitor process of Inventor, when your application is executed, take a look if it failed to load some modules. Next diagnose why it cannot be loaded. Probably it is just a problem of path.

 

0 Likes
Message 3 of 5

Anonymous
Not applicable

Hi,

 

How can I monitor the process of Inventor when my application is executed? Sorry but I'm not that familiar of the internal process of Inventor.

 

Thank you very much.

0 Likes
Message 4 of 5

ekinsb
Alumni
Alumni

If you can post a simple version of your VBA program that demonstrates the problem that will be best way for us to help you.  Otherwise we're just guessing.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes
Message 5 of 5

Anonymous
Not applicable

Hi ekinsb,

 

Please see below my code: (Add drawing document)

 

Private Sub CmdLoadTemp()
    
    ' Get Template
    Dim NewDrawing As Document
    
    Dim oTemplate As String
    Dim activeProjname As String
    
    On Error GoTo ERRBLK
    CLDfrm.labelPrompts.Caption = "   Opening drawing template . . ."
    activeProjname = ThisApplication.DesignProjectManager.ActiveDesignProject.name
    If UCase(Units) = "U.S. CUSTOMARY" Then
        oTemplate = ThisApplication.InstallPath & "Templates\LD_PV_LE_ENGLISH_" & activeProjname & ".idw"
    Else
        oTemplate = ThisApplication.InstallPath & "Templates\LD_PV_LE_METRIC_" & activeProjname & ".idw"
    End If
    
    'Sleep (5000)
    
    Set NewDrawing = ThisApplication.Documents.Add(kDrawingDocumentObject, oTemplate, True)
    
    Call SetDrawingStyles
    
    Dim oDrawDoc As DrawingDocument
    Set oDrawDoc = NewDrawing ' ThisApplication.ActiveDocument

    ' Obtain a reference to the desired border defintion.
    Dim oTitleBlockDef As TitleBlockDefinition
    Set oTitleBlockDef = oDrawDoc.TitleBlockDefinitions.Item("LD_PV_LE_Title")

    Dim oSheet As Sheet
    Set oSheet = oDrawDoc.ActiveSheet 'ThisApplication.ActiveDocument.ActiveSheet

    Dim oPromptStrings(1 To 26) As String
    Dim i As Double
    For i = 1 To 26
        oPromptStrings(i) = ""
    Next
    
    If oSheet.TitleBlock Is Nothing Then
        Call oSheet.AddTitleBlock(oTitleBlockDef, , oPromptStrings)
    End If
    
    Set NewDrawing = Nothing
    Set oDrawDoc = Nothing
    Set oTitleBlockDef = Nothing
    Set oSheet = Nothing
    Exit Sub

    If Err.Number <> 0 Then
        MsgBox Err.description, vbCritical, "CmdLoadTemp"
        Call TechErrorLog(eqfolder, EQNameRev, "List Number:" & CLDfrm.QueueStart & "~" & Err.Number & "~" & Err.description & " at CmdLoadTEmp")
        End
    End If
End Sub

 We have a the same program that is deployed on other PC's and it works fine.

 

Hope you can help me on this.

 

 

0 Likes