WebBrowserDialog Crashes Inventor

WebBrowserDialog Crashes Inventor

benjamin_nicholas46UJL
Explorer Explorer
190 Views
2 Replies
Message 1 of 3

WebBrowserDialog Crashes Inventor

benjamin_nicholas46UJL
Explorer
Explorer

I have tried using the sample program and another version suggested by another user in an old post, however neither are working and as soon as the macro runs it crashes?

Private oWebBrowserDialog As WebBrowserDialog

Sub DismissWebBrowser()
    Set oWebBrowserDialog = Nothing
End Sub

Sub WebBrowserDialogSample()
    ' Create a WebBrowserDialog
    Set oWebBrowserDialog = ThisApplication.WebBrowserDialogs.Add("MyBrowser", False)
    oWebBrowserDialog.WindowState = kNormalWindow
    
    ' Nagigate to a web site
    Call oWebBrowserDialog.Navigate("http://www.autodesk.com")

    ' Play a tutorial video if you have the Interactive Tutorial installed
    ' Call oWebBrowserDialog.Navigate("C:\Users\Public\Documents\Autodesk\Inventor 2017\Interactive Tutorial\en-US\Fundamentals\Video\Drawings.webm")

    ' Delete it - commenteted
    ' oWebBrowserDialog.Delete
End Sub

 

0 Likes
191 Views
2 Replies
Replies (2)
Message 2 of 3

JelteDeJong
Mentor
Mentor

I'm not familiar with the "WebBrowserDialog". But maybe you could start the default browser to show your content. Something like this might work.

Dim processStartInfo = New ProcessStartInfo("www.google.nl")
processStartInfo.UseShellExecute = True

Process.Start(processStartInfo)

 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes
Message 3 of 3

benjamin_nicholas46UJL
Explorer
Explorer

I am new to using VBA with Inventor so am a bit lost here, where is the ProcessStartInfo object found? I have looked through the VBA programming documentation and cannot see it anywhere.

I also may not be able to use shell executions due to workplace restrictions which may entirely rule out this as an option, but I am happy to try and see if we can get it to work if possible. I have seen some other examples using the System.IO, but these examples are in Ilogic, I am using VBA editor for Macros instead currently if that makes any difference.

0 Likes