New Script: evaluate logical operators and conditional expressions added to the comment of a Fusion 360 Parameter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everybody,
I ran into an issue where I needed to add an if statement to a design parameter. Fusion doesn't currently support this so I made this exploratory python script. Feel free to try it out and help improve it
What it does?
This script adds the ability to evaluate logical operators and conditional expressions added to the comment of a Fusion 360 Parameter.
Example Comment:
if OD_IN >7:; OD_IN = OD_IN;else:; OD_IN=11;
Syntax:
Evaluated comments are long one liners so use python syntax , semi colons are replaced with a new line character, indentation needs to stay consistent. Some commands are disallowed.
Want to try it out or contribute?
Note:
Conditional expressions can also be done with min(max( but this is messy. ex
min(max(( ( ( N1_EA - 5 ) * 1000 ) * 1 in ); 6 in); ID_IN