Hi,
I have managed to change the value of my embedded excel using:
GoExcel.CellValue("3rd Party:Embedding 1", "Sheet1", "B9")= diameter
I succesfully change the value using form and iLogic function.
However, the solid model doesn't automatically change. I need to open(edit) the embedded file and save(update) it manually for the solid model to notice the change in the value.
Could anyone help me, how do I made the solid model to automatically update itself when I change the value in its embedded excel using form function.
Thank you.
Hi Sya,
you can use this snippet:
iLogicVb.UpdateWhenDone = True
(you can find it in the deocument archive snippet in the Edit Rule windows)
You can activate the rule with the snippet using the event trigger for example ( Manage> iLogic>Event Triggers)
Consider that the file (assembly or part) need to be open once to feel the excel changes)
I hope that it could help you.
Admaiora
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
I'm trying to make sure that I fully understand the process you're implementing:
So you're changing the parameter "diameter" through a form and once that parameter is changed, your iLogic code sends that integer to the excel spreadsheet. Then once passed to the spreadsheet, it is then passed back into the part file as a different parameter. At least that's the impression I'm getting.
It seems like your form could directly influence the parameter used on your circle in the .ipt as well as "diameter".
Then I agree with the person who replied before, use the itrigger "Any Model Parameter Change" to run your Rule and place
iLogicvb.UpdateWhenDone = true
at the end of your code.
my process is=
1) insert a value into a user defined parameter called 'diameter' --> 2)send that value into an embedded excel file --> 3)make inventor automatically notice the change of value --> 4)make inventor automatically update the model
I've succesfully make process 1) and process 2) to function, however I need to manually open the embedded excel file and save it to make inventor notice the change in value.
Process 4) is succesfully done using the code you guys wrote. Thank you.
syafiqfaiz,
This is my point. You can have the form modify "d0" (the dimension used in the circle) and then pass it directly into the spreadsheet by:
GoExcel.CellValue("3rd Party:Embedding 1", "Sheet 1", "B9") = d0
iLogicVb.UpdateWhenDone = True
Then the parameter is passed to the part first before being sent to the spreadsheet. I've attached an .ipt file to help illustrate my point. You don't need to open the excel file to make the part update.
Note that in my example, the spreadsheet is "Embedding 2" not "Embedding 1" which changes my code slightly.
I have very similar situation. However, parameter value change is reflected throughout the sub-assemblies & parts. Parameter value inside embedded excel also changes. But the model doesn't update automatically.
But, the command
SyntaxEditor Code Snippet
iLogicVb.UpdateWhenDone = True
or
SyntaxEditor Code Snippet
iLogicVb.UpdateWhenDone = True InventorVb.DocumentUpdate()
apparently isn't working. Any hints?
didn't help either.
Regards
Kamalesh