- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Well... Maybe I shouldn't blame DoubleForEquals.
No matter, I'm still having a hell of a time with what I thought was some pretty basic floating point conversion (for Inventor).
Attached is a part (2012 - so that everyone should be able to open it) that has few userParameters inside of it that I've made for this demo.
Essentially, the expression
(testParameter1 - (testParameter2 + (testParameter3*2))
when used inside of iLogic, will evaluate to a very very non-precise number if I'm using a real number 440.0625 and up*.
This wouldn't be a problem at all if I could just evaluate it inside of the parameters (as I have done in testParameter4), however I need to use iLogic to 'logic' some other factors and then use the above expression or a different one. NO matter, using a parameter that is 440.25 inside of any iLogic expression results in bad things happening.
Is there anyone out there who might know why this is? I've never ran into an issue using smaller numbers, and the reason I put that little red (*) up there was because I later found out that that statement was false. Using values like 1440.25 (which would, in the expression above become :
(1440.25 - (1437.25 + 3))
will evaluate down to 0 with no problem. It's only certain numbers, in certain rangers that really really mess with Inventor, and I can't figure out why!!!!
If you have no idea what on earth I'm talking about, please download that part and see for yourself. You'll also notice some commented out code, which contains various other tests and ways of getting around the limitations of how iLogic seems to be parsing things, but most of those would seem rather redundant if there is some easier way to achieve precision.
Thank you all for your help!
If my solution worked or helped you out, please don't forget to hit the kudos button 🙂
iLogicCode Injector: goo.gl/uTT1IB

Solved! Go to Solution.