Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ilogic- run program 2 times

4 REPLIES 4
Reply
Message 1 of 5
rgajewski
438 Views, 4 Replies

Ilogic- run program 2 times

I'm having an issue where when I run my RULES the model updates 99% of the assembly components.  The 1% will update if I run the RULE again with the same inputs.  What am I missing?

4 REPLIES 4
Message 2 of 5
adam.nagy
in reply to: rgajewski

Hi there,

 

Sounds like there may be some interdependency between the operations you are doing, so some of them do not succeed for the first time around, but when certain things got updated, then the remaining 1% can get updated too?

 

Not sure if it makes sense in your case. Does it only happen to a certain assembly?
If you do similar update through the user interface, then all is fine?

 

Cheers, 



Adam Nagy
Autodesk Platform Services
Message 3 of 5
danvang
in reply to: rgajewski

If I remember correctly I run into this sometimes when I am calculating a parameter in a rule and that parameter is used in a later rule. The later rule still uses the old parameter value therefore the parts doesn't update properly. To correct this I have to use RuleParametersOutput() and InventorVb.DocumentUpdate() at the end of the first rule. This way the later rule is using the new value. Not sure if this is what's happening in your case but just wanted to throw that out there.

Dan

** If my reply resolves this issue, please choose "Accept as Solution" **
Dan Vang
Message 4 of 5
xiaodong_liang
in reply to: danvang

Hi danvang,

 

Could you try to isolate to provide a test demo? It is hard to diagnose with the description only. Thank you.

Message 5 of 5
danvang
in reply to: rgajewski

Here are two examples that I quickly came up with. I found different ways to make the code work but when you are initially writing it, you are expecting it to work a certain way and it doesn't. Hope these examples help.

 

Dan

** If my reply resolves this issue, please choose "Accept as Solution" **
Dan Vang

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

Post to forums  

Autodesk Design & Make Report