
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have iLogic code that alters my sketch, which changes the value of a Reference Parameter. I want to use that Reference Parameter to alter another sketch through iLogic.
The problem is, the Reference Parameter is not updated immediately, so the iLogic code needs to be run twice to get the right value of the Reference Parameter.
To illustrate the issue, I created a sketch as shown:
I run the following code:
Length1 = DesiredLength
Length2 = RemainingLength
iLogicVb.UpdateWhenDone = True
So Length1 is immediately set to the value of DesiredLength when the code is run, but RemainingLength is not updated, so Length 2 is not updated. If I run the code again, first then Length2 is updated correctly.
I know that in this specific case I could constrain the two squares to each other, or use following code instead:
Length2 = MaxLength - Length1
But my real user case is much more complex, involving multiple parameters and trigonometry, so I would prefer to use Reference Parameter as input.
Can this even be done, or is it a limitation in the way iLogic code is executed?
Solved! Go to Solution.