- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've been handling this issue for some time now, thought I'd bring this up to see if this is a bug or working as intended...
Basically I'm finding that as long as my iLogic is only modifying a Parameter value once, then the parameter updates correctly. However if a value is modified more than once then the parameter fails to update at all per the iLogic rule.
A typical workflow I use it first to ensure the input value is within an acceptable range, in this example I'll be accepting a value of 1 thru 10 in any decimal value. I'll then make sure the user input is rounded to a specific fractional value to ensure consistency in output. For example, some people may enter 0.6, 0.63, or 0.625, etc for a value of 1/16th. I use an algorithm to ensure it's always "exactly" a decimal equivalent to the nearest 16th value.
'ensure user input is between 1 and 10, decimal values allowed If Dia < 1 Or Dia > 10 Then Parameter("Dia") = 5 'round user input to nearest 16th '(this works ONLY if line 2 doesn't change the "Dia" parameter value Parameter("Dia") = Round(Dia * 16) / 16 'rem this line to get parameter updates to work
A work around I've found is the following double method...
'this method appears to be a valid work around If Dia < 1 Or Dia > 10 Then Parameter("Dia") = 5 Dia = 5 End If Parameter("Dia") = Round(Dia * 16) / 16 Dia = Round(Dia * 16) / 16
I've played around a bit trying updates with "RuleParemetersUpdate()" and "InventorVb.DocumentUpdate()" but they don't appear to help.
It appears to me that parameters just won't correctly update if modified more than once during the iLogic rule. Is this intended, is there a best practice, or is this news to everyone else?
File attached in Inv Ver 2023 for your sample review, just open the Parameters menu. Choose to use the Alternate method (with the work around) or not (doesn't update) and just edit the "Dia" model parameter with values to see how it responds.

Solved! Go to Solution.