Batch Run iLogic rule to change linked Excel file.

Batch Run iLogic rule to change linked Excel file.

Anonymous
Not applicable
631 Views
1 Reply
Message 1 of 2

Batch Run iLogic rule to change linked Excel file.

Anonymous
Not applicable

My first forum post so I apologize in advance for not observing any long standing custom or convention. Here is what we are trying to do.

 

Background: We have successfully implemented the use of linked Excel files into some of our assemblies and have enjoyed great success and productivity as a result of this. However we are encountering a consistent “human” error that we think we can mitigate with an iLogic rule and thus make an initial part of our design process more accessible to novice or casual inventor users in our organization. In other words we have minimally trained folks who wish to use this and we cannot expect that to change (even if it should).

 

Objective: We would like to have an iLogic rule that batch changes the linked excel file to a different excel file. From the top level assembly .iam we would execute this rule and it would open all refed sub-assemblies and piece parts and change the excel link.

 

Research: There is some excellent code that we already use that will open all referenced files from the top level assembly, found here: https://forums.autodesk.com/t5/inventor-general-discussion/open-all-parts-in-assembly-at-once/td-p/3...

 

We also have functional code that will change the excel link to a specified ‘new” link, as follows:

 

changeOK = GoExcel.ChangeSourceOfLinked("","C\Inventor Workspace\XXX\ XXX_Design_Worksheet.xlsx")

 

We need to: 1) somehow combine these two so that we can batch open each ipt & iam and change the link in each to the desired new excel file. 2) We need to have the path and filename displayed above as C\Inventor Workspace\XXX\ XXX_Design_Worksheet.xlsx modify its location automatically without any prompts or entering it manually. I think this is a possibility as A) The location of the linked file is in the exact same path location as the top level assembly, sub-assembly and parts. It would follow that we can obtain the path location from the open assembly for the first portion of our desired path and file name. B) The naming conventions on all our linked excel files is always the same: XXX is the top level assembly part number and is always followed by _Design_Worksheet.xlsx. C) The new / desired excel file is created first so it is present to be linked to by the time this rule would be run.

 

I am pretty much a noob and VBA.net and iLogic but have managed to leverage quite a bit of new functionality out of our software for our engineering team with just a little knowledge. Any instruction or advice on this challenge will be greatly soaked up and incorporated into my BOK.

 

Thanks forum mates, and happy inventing.

0 Likes
632 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
0 Likes