Probably a Simple Problem: Using CreateFileDialog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am new to iLogic (as I'm sure I am about to make clear), and I am running into an issue creating a macro. I am trying to adapt the following example to batch process some files (Source) but I am getting errors just copying and pasting the code.
Right now I am trying to get past the first few lines. When I paste it into the macro editor I get:
Dim oFileDlg As inventor.FileDialog = Nothing InventorVb.Application.CreateFileDialog (oFileDlg) 'Search Criteria oFileDlg.Filter = "Inventor Assemblies (*.iam)|*.iam"
I get an syntax error which I can reslove by removing the " = Nothing" piece. However, then I get an error message saying "Object variable or With block variable not set".
The more I try to adjust the code the more errors I run into. Since this is an example I have seen elsewhere I assume the code is correct and I am just doing something wrong. Do I need to check some references or something? Has anyone else run into this before?
Sorry if this is a dumb question, I am trying to find the answer on my own but the code above seems to work for everyone else in all the examples I can find.
I am running Inventor 2015