Inventor 2021 iLogic & Excel Linking

Inventor 2021 iLogic & Excel Linking

a1701101
Explorer Explorer
2,440 Views
11 Replies
Message 1 of 12

Inventor 2021 iLogic & Excel Linking

a1701101
Explorer
Explorer

Hi All,

 

I am new to using iLogic and would like to know if it is possible to be able to take in parameters from this type of excel spreadsheet to a Inventor Part File. My overall goal is to be able to take in parameters made in this spreadsheet and link it to a specific inventor part file. I would like help with three things that I am currently having troubles with, which are:

 

1.   I am unable to figure out why Inventor's iLogic are not able to detect the sheet name of this excel spreadsheet even though both have the same exact information. [See "Busbar Database Excel Screenshot" & "iLogic Brower Screenshot Error" for clarification].

 

2.   Once I have gotten this to work, will Inventor's iLogic be able to read what is inside the "Template" parameters taken from the Excel and link it to an existing pre-made template of the part (in this case, "90 Degree 'L' " links the dimensions filled in that row to be put to Busbar_L_Template.ipt, while "straight" template with different dimensions links to a different .ipt)? 

 

3.   Then, will the use of Inventor's iLogic commands be able to generate copies of the .ipt files but uses both "Template" and "Reference Number" parameters taken with the Dimensions associated with it. (e.g. Generating Busbar_L_Template_Reference Number.ipt from Busbar_L_Template.ipt such that 90 Degree 'L' Busbars with different dimensions can be differentiated). I think you can use "Copy Design" function to do this but I am unsure whether it will be able to alter the file names automatically to avoid file clashing, etc. 

 

Any help to all or each of these queries will be greatly appreciated.

 

 

0 Likes
2,441 Views
11 Replies
Replies (11)
Message 2 of 12

aelqabbany
Advocate
Advocate

Point 1: I have no idea why you are running into that issue. I tried your code and it ran fine on my machine. Make sure that you are linking to the right Excel file and that the file is closed when you run the code.

 

Points 2 & 3: Have you considered using the ipart functionality within Inventor? Here is a simple tutorial that could help: https://www.youtube.com/watch?v=kLbQh-5KXXc

0 Likes
Message 3 of 12

WCrihfield
Mentor
Mentor

Here is a link you may find useful/informative on the subject:

To Link Numeric Parameters from a Spreadsheet 

Excel Data Links Functions Reference (iLogic) 

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 4 of 12

A.Acheson
Mentor
Mentor

@a1701101 

 

From the ilogic editor image your filename is written as a string with double quotes "excelFileLocation". A full file path would normally be placed here. You have all ready converted this full file path to a string. Remove the quotes to use the string already created. 

 

GoExcel.CellValue(excelFileLocation..........

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

a1701101
Explorer
Explorer
Hi aelabbany,
 
I have solved the problem in linking the Inventor to the spreadsheet and have considered the iPart feature. Doing it that way is good but it would seem that the process will all have to be done within Inventor which is somewhat not ideal. My project deals with integrating the dimension data that is within the spreadsheet and then using that to create or "generate" different iterations of the same part. Do you think doing this just through iLogic will be feasible or the iPart feature is the closest that I will get in "generating" those parts? 
 
Cheers.
0 Likes
Message 6 of 12

aelqabbany
Advocate
Advocate

If you are fine with copy-pasting from your spreadsheet into your iPart table, then this method should work: https://knowledge.autodesk.com/support/inventor/learn-explore/caas/screencast/Main/Details/bc18cb40-...

 

Otherwise if you want to do it entirely through your spreadsheet, then you can see how to do that here: https://forums.autodesk.com/t5/inventor-customization/use-ilogic-to-fill-in-ipart-table-values-from-...

0 Likes
Message 7 of 12

A.Acheson
Mentor
Mentor

@a1701101 

I haven’t been able to see your part as I have only inv 2020 but here is some info on iParts. The factory file will create a derived part called the member. You have to return to the factory file each time you want a change and publish it out again and update. You cannot edit the member directly other than in assembly to make a hole etc but these features do not appear in the member file when opened. Any feature you want to see in the member work plane etc needs to be activated in the ipart table in the factory file. This work flow is more suited to standard items like bolts and fasteners or consistant every day parts. You can also automate the drawing creation somewhat if you use this method as well. 

You can make a rule to import iproperties to factory ipart from an excel sheet if you think you have a lot of members. Let me know if you need this. 

 


If you are changing the part daily or want to use it with a form as a configurator part, ilogic is the one to use. It is more powerful over all.

 

Down side

is all the iproperties per configuration  needs to be included in the code/ excel sheet. You need the ilogic copy and stabilize the file name in the code.

 

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

a1701101
Explorer
Explorer

Hi @A.Acheson 

 

The part or parts in questions are busbars. I have included one of them attached here but essentially I have created a 'base' model for each of the different types, from straights to 'L' shapes to 'Z' shapes that I want to have generated according to different set of dimensions by altering it in terms of width, length and thicknesses. Originally, I would want to take these terms from the spreadsheets and somehow put it in an iLogic and through some coding, automatically generate the similarly 'altered' parts. From most of the replies here and your suggestion, I would think I should attempt to integrate the excel spreadsheet to the iPart or use the iPart feature entirely instead of playing around with iLogic and integrating that with an excel spreadsheet to make the parts. So I would want to take up your offer to know more about it. 

 

Best regards,

 

0 Likes
Message 9 of 12

A.Acheson
Mentor
Mentor

@a1701101 

 

Are you manufacturing the bus bar from sheet metal or is this a purchased part? The reason being you can do an iPart in sheet metal also but there is some setup to that method. It just depends if you need production drawings or is this just a space holder in your model.


To work with your excel data you have already prepared

You can use the built in excel tool in the ipart to copy your data directly in after arranging columns in the correct order. Rearranging the columns does become a pain which you will quickly realize. 

Using ilogic to pull in excel data for iproperties can help in the ipart but it can be slow to set up initially . It really is only faster if the excel column names are the same all the time when exported from an MRP/inventory software. 

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

a1701101
Explorer
Explorer

Hi @A.Acheson 

 

The busbars are manufactured from solid bars of copper, cut to size and then bent with the use of a bending machine. The only reason why I need to make or generate these models is to include them in assemblies. The idea was to use the spreadsheet that contains the busbar information and/or dimensions and then using Inventor's iLogic to constantly read the information of that spreadsheet and then generate models of it automatically. 

 

I would guess since iPart has that automatic 'generation' ability, it would be best if I use the iLogic to pull in the data from the spreadsheet into iProperty parameters then use it to the iPart to generate the parts. I am new to this so I am somewhat struggling in making the iLogic pull in the data from the sheets and set it up as iProperty parameters. 

 

Best regards,

0 Likes
Message 11 of 12

A.Acheson
Mentor
Mentor

@a1701101 

 

There is two methods to do this with iLogic.

Accessing directly the iPart excel sheet

I have never accessed the imbedded excel sheet with iLogic that the iPart uses to set parameters etc. There is posts on this forum but it seemed over my head to begin doing it.

 

Modifying iProperties by iLogic

The second method is for the iProperties. You would have to create the qty of members you need  manually, just filling down the excel sheet. In the iPart table all iProperties being imported need to be visible on the list. Then use the both external rules attached. They work together so ensure the excel file in G_iProperties import has been created and the fields contain data.

 

Be careful to use a test file until you are comfortable using the for loops that the rules contain. The G_iProperties import rule can be used on it's own in  any part or assembly or drawing when opened to import iProperties.

I haven't tested these after tidying them up so hopefully no errors appear.

 

 

 

 

 

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

a1701101
Explorer
Explorer

Thanks, I will try both solutions will get back to you if I have managed to successfully implemented it. 

0 Likes