Variable update bug
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
First, I apologise if I'm not clear so if you need clarification just ask and I'll probably reply pretty quick. (assuming it isn't 3 years later)
I have a program set up where I am importing some 400 unique values from a database file via a .dll (probably irrelevant) based on specific design criteria. What I need, is to "null" (0, blank, or false respectively) all the parameters in Inventor (Mechanical 2015) whenever I import a new design so that I don't accidentally carry over incorrect data.
1. Ideally when I import, if the value is 'nothing' it should set the parameter to null but it appears that it just skips the parameter when it is 'nothing'. When I set the parameters as "parameter("example")" it sees 'nothing' as Boolean and won't update the parameter. I've considered creating a temporary array to convert 'nothing' values, but then I don't know if the value is supposed to be an integer, Boolean or text.
2. When I run the "reset" code and the "import" code separately (as two different buttons), it works cleanly every time. When I run them sequentially, either combined into one rule or as two separate rules, it will reset all values but then it won't update the new imported values - and the values seem to update differently for different designs. For one design it would import every value except for 3 specific values, and then for a different design it would only update 1 value. Then, when you run the logic twice in a row, it will flip-flop between the updated values and null values. I've even added a delay between running import and reset, but it will only work if you run the rules totally separately.
At this point my conclusion is that it just seems to be a bug in the way Inventor updates it's values and I have to leave it as two separate functions