- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey I can't seem to get this code to work:
'Create File Open Dialogue oDoc = ThisDoc.Document Dim oFileDlg As Inventor.FileDialog = Nothing
InventorVb.Application.CreateFileDialog(oFileDlg)
oFileDlg.Filter = "Part Files (*.ipt)|*.ipt"
'Set open location :
oFileDlg.InitialDirectory = "C:\Users\Name\Desktop\"
'Show File Open Dialogue
oFileDlg.DialogTitle = "Open a Part File" oFileDlg.ShowOpen() PartName = oFileDlg.FileName If PartName = "" Then : Return : End If
It works perfectly until you choose a file and it doesn't open anything in Inventor (empty). The initial directory is important for me so I can make a form with parameters changing then initial directory location. I got a similar thing working in assembly file, but to get it to work in a part file is a problem. Am I missing some line of code or?
Solved! Go to Solution.