Macro enabled Excel and Inventor

Macro enabled Excel and Inventor

jeremy.farrugia.18
Explorer Explorer
620 Views
5 Replies
Message 1 of 6

Macro enabled Excel and Inventor

jeremy.farrugia.18
Explorer
Explorer

Hi all,

 

I am trying to connect a macro enabled excel sheet to my  Inventor. The data inputted on the excel sheet is saved onto sheet 2 of the excel file and I cannot find a way how to properly link it to inventor. Any possible solutions?

 

TIA

0 Likes
621 Views
5 Replies
Replies (5)
Message 2 of 6

A.Acheson
Mentor
Mentor

Have you tried using the excel application?

https://knowledge.autodesk.com/support/inventor/learn-explore/caas/simplecontent/content/how-to-acce...

 

I am assuming you just want to pass information between excel and inventor and not trigger a macro in the work book? 

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

jeremy.farrugia.18
Explorer
Explorer

Yes, I dont want to trigger the macro from inventor.

0 Likes
Message 4 of 6

jeremy.farrugia.18
Explorer
Explorer

Thanks for the link, where do I add the code please? Is there a command window?

0 Likes
Message 5 of 6

A.Acheson
Mentor
Mentor

You can either use the in document ilogic editor or if you want this to run on multiple documents use an external rule.


If you are not familiar with working with external rules here are two links to get you started. 

https://autodeskmfg.typepad.com/blog/2012/01/working-with-external-ilogic-rules.html

https://forums.autodesk.com/t5/inventor-forum/add-create-external-rule-ilogic/td-p/6033312

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

A.Acheson
Mentor
Mentor

You can also use the ilogic snippets here if you simply want to look up values/ add values to the sheet. You won't have access to all of the excel functions compared to direct access to the application. But it is much quicker to set up. 

List = GoExcel.CellValues("EXCEL PATH.xlsm", "Sheet1", "B2", "B10")
d0 = InputListBox("Prompt", List, d0, Title := "Title", ListName := "List")

AAcheson_0-1638903834385.png

AAcheson_0-1638904033144.png

 

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