1. Do you think I was magically born with all of this knowledge, or did I perhaps go through the same struggles of trial and error with this?
2. You're not entitled to anyone's help. Maybe reconsider your perspective. Would helping people be the "nice" thing to do? Yes. Is helping people a requirement/owed to people? No.
3. Read and learn. It's a sloppy mix of iLogic and vb.net, but it works.
Sub Main()
OpenDocByBrowserName("PartB:1")
End Sub
Sub OpenDocByBrowserName(oBrowserName)
Dim compOcc As Inventor.ComponentOccurrence
Try
compOcc = Component.InventorComponent(oBrowserName)
Catch
MsgBox("Issue finding browser name." & vbLf & vbLf & Chr(34) & oBrowserName & Chr(34))
Exit Sub
End Try
Dim oDoc As Inventor.Document
oDoc = compOcc.Definition.Document
oDocName = oDoc.FullDocumentName
Try
ThisApplication.Documents.Open(oDocName, True)
Catch
MsgBox("File has not been saved or other issue opening file occurred" & vbLf & vbLf & Chr(34) & oBrowserName & Chr(34))
Exit Sub
End Try
End Sub
--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.