Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to automatically update model when finished updating embedded excel.

5 REPLIES 5
Reply
Message 1 of 6
syafiqfaiz
1704 Views, 5 Replies

How to automatically update model when finished updating embedded excel.

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.

 
Tags (3)
5 REPLIES 5
Message 2 of 6
admaiora
in reply to: syafiqfaiz

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.

EESignature

_____________________________________________________________________________
Facebook | Twitter | Youtube

Message 3 of 6
wimann
in reply to: syafiqfaiz

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.

 

 

-Will Mann

Inventor Professional 2020
Vault Professional 2020
AutoCAD Mechanical 2020
Message 4 of 6
syafiqfaiz
in reply to: wimann

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.

 

 

Tags (3)
Message 5 of 6
wimann
in reply to: syafiqfaiz

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.

-Will Mann

Inventor Professional 2020
Vault Professional 2020
AutoCAD Mechanical 2020
Message 6 of 6

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?

 

https://www.cadlinecommunity.co.uk/hc/en-us/articles/202020451-Inventor-2015-iLogic-Form-Immediate-M...

 

didn't help either.

 

Regards

Kamalesh

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report