- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The attached file should have two columns. One named "Series" (cell A1), one named "Project" (cell B1). It just has placeholder data right now for project names as a test.
The "Series" column will be a set of 3 digit numbers (as a string, because I want the leading zeroes), and the Project column will be a string.
The intent is to have a rule that looks at the filename when the rule is run. The expectation is that the first three digits of the filename will match one of the rows in the "Series" column, and if a match is found, to update the "Project" iProperty of the file with the contents of the corresponding "Project" column for that Series number.
It's basically re-creating VLOOKUP in Inventor 2020 with iLogic.
The goal is to give the user a button to press to populate the Project name into files without having to retype it, so all of the parts and assemblies in a given series always have the same Project information, which eventually gets displayed on the title block later on.
When it runs, I get an error that it couldn't match the column name, but I'm fairly confident they're both just called "Series".
What am I doing wrong?
I'm currently using Inventor 2020.
This is the code I have:
oDoc = Left(ThisDoc.FileName(False), 3) GoExcel.Open("C:\InventorWorkspace\ProjectLookup.xls", "Sheet1") GoExcel.TitleRow = 1 i = GoExcel.FindRow("C:\InventorWorkspace\ProjectLookup.xls", "Sheet1", "Series", "=", oDoc) MessageBox.Show(i, oDoc) 'Test -- error occurs before I get here. 'iProperties.Value("Project", "Project") = GoExcel.CurrentRowValue(What_Goes_Here?)
Solved! Go to Solution.