Inventor 2022 iLogic not pulling through all parameter values from Excel

Inventor 2022 iLogic not pulling through all parameter values from Excel

andrew.tom.reynolds
Advocate Advocate
1,182 Views
12 Replies
Message 1 of 13

Inventor 2022 iLogic not pulling through all parameter values from Excel

andrew.tom.reynolds
Advocate
Advocate

I have a complex model that was originally developed in Inventor 2019 and then has been being used recently in 2021 without any issues. Today I took a copy of that model and migrated it into 2022 and have run into an issue.

 

The main iLogic rule pulls approx 180 parameters from an Excel sheet and then does various things throughout the assembly, it's parts and a master part.

 

Without changing anything, in 2022 version it seems to only be grabbing a handful of these parameters and ignoring others (the values remaining as they were when it was last run). I have re-run the test with the same spreadsheet in 2021 and it works flawlessly. I have tried different copies of the spreadsheet with different parameters and still the same. It seems to grab some of the values but ignores others.

 

Is anyone aware of any changes from Inventor 2021 to 2022 iLogic / Excel interface that might be causing these issues??

 

Thanks.

0 Likes
1,183 Views
12 Replies
Replies (12)
Message 2 of 13

R.Mabery
Advocate
Advocate

In 2021 ADSK gave us the option of controlling which default Excel engine we want iLogic to run.  It seems you are only reading in values but are any of the cells you are trying to read being recalculated?

 

Take a look at the Advanced iLogic Configuration dialog box to see which Excel Option you are running in 2021 and in 2022.  

 

Per the Help file, iLogic should switch to what it needs but there are cases where it can't determine.  

 

 


Thanks,
Randy Mabery
Applications Expert
IMAGINiT Technologies
0 Likes
Message 3 of 13

andrew.tom.reynolds
Advocate
Advocate

I have both 2021 and 2022 versions set to use the "Internal" engine. I have tried both ways and it makes no difference with the error that is happening.

I have also tried it on 2 different PC's just to be sure it wasn't something specific to the first PC.

0 Likes
Message 4 of 13

A.Acheson
Mentor
Mentor

@andrew.tom.reynolds 

Is it possible to post the ilogic code with a sample excel data sheets. This might identify issues in the code.

 

From my observations different versions of inv seem to trip up at different points based on how it was coded. Making it difficult to know what happened. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 5 of 13

andrew.tom.reynolds
Advocate
Advocate

Unfortunately this is a massive set of files with a lot of code and also it's confidential to my client. I will try to find some time to create a simplified dataset and try to replicate the issue.

0 Likes
Message 6 of 13

CattabianiI
Collaborator
Collaborator

In addition to what Alan asked: 
1. Is the excel linked or embedded (through Paramters or Insert Object command) or just opened from an hardcoded path via iLogic?
2. From what you're saying the rule runs without error or you maybe try-catch them?
3. Do you have old lod or new modelstates in these documents?

0 Likes
Message 7 of 13

emaiolino
Advocate
Advocate

Hi!

I am having the same problem, in a very simple iLogic rule that simply assigns multiple values ​​to a user parameter, this list of values ​​is read from the excel file, in previous versions it works perfectly and in version 2022 it throws me a error, because it cannot find the Excel sheet, even though it exists and is fine.
Next I copy the fragment (it is very simple):


''Definir ruta del archivo Excel de trabajo
xlsPath = ".\XLS\Procesos.xlsx"

''Definir Listas de valores para los parámetros, en base al Excel
MultiValue.List("Pre_Process_01") = GoExcel.CellValues("Procesos.xlsx", "Hoja 01", "B7", "B50")
MultiValue.List("Pre_Process_02") = GoExcel.CellValues("Procesos.xlsx", "Hoja 01", "B7", "B50")
MultiValue.List("Pre_Process_03") = GoExcel.CellValues("Procesos.xlsx", "Hoja 01", "B7", "B50")
MultiValue.List("Pre_Process_04") = GoExcel.CellValues("Procesos.xlsx", "Hoja 01", "B7", "B50")
MultiValue.List("Pre_Process_05") = GoExcel.CellValues("Procesos.xlsx", "Hoja 01", "B7", "B50")

 

If someone can help me, I thank you in advance!

 



Esteban Maiolino
Titular EMBA Proyectos
Sitio web o nombre del blog
Facebook | Twitter | LinkedIn

0 Likes
Message 8 of 13

A.Acheson
Mentor
Mentor

Can you check if the Excel Options: Com/internal.

https://knowledge.autodesk.com/support/inventor/learn-explore/caas/CloudHelp/cloudhelp/2022/ENU/Inve...

 

Also is the file in this path ?

xlsPath = ".\XLS\Procesos.xlsx"

or is the file in the workspace where the part/assembly file is? This would be partfilepath& Procesos.xlsx

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 9 of 13

emaiolino
Advocate
Advocate

Hello @A.Acheson ,

Thanks for the reply!!
Yes, I checked the Excel settings and in one option it doesn't find the file directly, and in the other it doesn't find the sheet.
Yes, the Excel file is saved in that path.
Yes, the Excel is in the same workspace as the parts.

However still, I can't get it to work but in previous versions it worked perfectly, I copied the fragment verbatim in the 2020 version and it works correctly.



Esteban Maiolino
Titular EMBA Proyectos
Sitio web o nombre del blog
Facebook | Twitter | LinkedIn

0 Likes
Message 10 of 13

emaiolino
Advocate
Advocate

@A.Acheson ,

I already found the solution !!!
The file must be saved with the extension "XLS", if it is saved as "XLSX", which is the new Excel extension, it does not work. When saving it with the previous extension (XLS) and executing the rule again replacing the extensions, it works correctly !!!!
Obviously there is an error there.

 

@andrew.tom.reynolds Try this modification to see if it solves the problem, if it works for you.



Esteban Maiolino
Titular EMBA Proyectos
Sitio web o nombre del blog
Facebook | Twitter | LinkedIn

0 Likes
Message 11 of 13

emaiolino
Advocate
Advocate

No, the extension change works for version 2021, but not for version 2022.
If Excel is defined as "ExcelEngine.COM" it cannot directly find the file, and if Excel is defined as "ExcelEngine.Internal" it cannot find the sheet.
I don't know what else to try.



Esteban Maiolino
Titular EMBA Proyectos
Sitio web o nombre del blog
Facebook | Twitter | LinkedIn

0 Likes
Message 12 of 13

WCrihfield
Mentor
Mentor

Have you tried specifying the full path and file name of the excel file, which includes either the drive letter or the name of the server computer on the network, instead of a relative path.  Then also, I noticed that you were creating that 'xlsPath' variable, putting some path and file name there, but then not using that within your call to GoExcel.CellValues().  Maybe try putting that variable, with the 'full' (not partial) path & name, into the position within the CellValues() call where you specify the Excel file's name, and see if that helps anything.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 13 of 13

emaiolino
Advocate
Advocate

Hello @WCrihfield , thanks.

I've tried that before thinking the same thing, but it doesn't fix it either. 



Esteban Maiolino
Titular EMBA Proyectos
Sitio web o nombre del blog
Facebook | Twitter | LinkedIn

0 Likes