- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have an assy linked to an excel file.
This link was made with ilogic.
I cannot link or embed an .xslm file from Inventor.
The location of the excel file is stated in the ilogic code.
Everything is in Vault Basic.
When I make a Copy Design, the code keeps pointing to the same location.
How can I set up the ilogic code so that it is automatically pointed to the new location.
Or is there an action to add that the user has to select the new location and this is copied into the ilogic code.
'Koppelen van artikelnr vanuit de BOM In Excel naar de Configurator sheet. Dim userParams As UserParameters = ThisApplication.ActiveDocument.ComponentDefinition.Parameters.UserParameters Dim excelFileLocation As String = "D:\$WorkingFolder\Vault Workspace\02_Basis ontwerpen\02_8_Bedienbaar daklicht\02_8_02_Vast\BoM Passiefhuis Daklicht 05-07-2019V1.xlsm" work = GoExcel.FindRow(excelFileLocation, "Configurator", "Artikelnr", "=", Artikelnr) For Each param In userParams Try Parameter(param.Name) = GoExcel.CurrentRowValue(param.Name) Catch End Try Next iLogicVb.UpdateWhenDone = True
I saw the code below but that was explained when the excel file was embedded.
But you can't link or embed an .xlsm file.
Dim oDocument As Document
Set oDocument = ThisApplication.ActiveDocument
'Delete original reference
Dim oD As ReferencedOLEFileDescriptor
Set oD = oDocument.ReferencedOLEFileDescriptors.ItemByName("aa.xlsx")
oD.Delete
'Add new reference with updated project location
Call oDs.Add(ProjectLocation + "\aa.xlsx", kOLEDocumentLinkObject)
Youre drawings are as good as the symbols that compleet them.....
Solved! Go to Solution.