Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.
Hello, I would like to ask you for help (if this is feasible to do) with something that i am trying to achieve.
I have some .ipt parts that carry an embedded excel spreadsheet. For example i have a WN flange that on the sheet1 page has a simple table with the parameters on it. These changes when the "nominal diameter" changes.
I would like to know if it possible to write an iLogic code that overwrites (changes) the "nominal diameter" value so all other parameters change autimatically an the part updates.
It would be very useful since it would avoid opening the excel file every time.
Thanks in advance to anyone that will be willing to help me
Solved! Go to Solution.
Solved by A.Acheson. Go to Solution.
Pls: https://forums.autodesk.com/t5/inventor-programming-ilogic/link-excel-file-to-parameters-via-file-di... https://forums.autodesk.com/t5/inventor-programming-ilogic/update-parameters-with-excel/m-p/10700058 https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-multivalue-parameter-from-excel-ta... https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-form-multi-value-parameter-does-no...
This snippet exist in your ilogic editor and here is a help page to better understand these snippets and functions.
In your parameter box you will see the name of the embedded excel file so change the code to match this name.
The example below will search for a column for a specific value and then return the row number. Once you have a row number you can either search another column and get a value (shown below or you could set a value.
i = GoExcel.FindRow("3rd Party:Embedding 1", "Sheet1", "Dia", "=", 0.2)
MessageBox.Show("Row No " & 1 )
dia = GoExcel.CurrentRowValue("Dia")
MessageBox.Show(dia)
Set a value
GoExcel.CellValue("3rd Party:Embedding 1", "Sheet1", "A1")= "1234"
UPDATE: Nevermind, i found it
adding GoExcel.Save
it updates the part when value is changed!
Thank you very much! Always on point!
-------------------------------------------------------------------------------------------
Hello @A.Acheson, thanks for the reply, it seems that effectively that is the way.
So i just added the second part to change the value in the embedded excel, and it actually changes it!
BUT, i still have to open the excel in order to have all the parameters updated, otherwise the ipt won't update
I am adding the file on this post, if you could take a little look, hope to not be bothering
posting the solved file as a start point for future posts, @A.Acheson if you have some advise it will be very much welcomed
Can't find what you're looking for? Ask the community or share your knowledge.