- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This isn't really a bug persay but maybe a suggestion for improvement.
Say you want to create a User Parameter (x) that is a function of other user parameters say (y/100). The user parameter.add() method must contain a valueInput object. I found that I can not directly add my expression in the valueInput.createByString method. I have to add it in 3 steps:
userValue = self.core.ValueInput.createByString('1' + units)
up = self.design.userParameters.add('x',userValue,units,' ')
up._set_expression('y/100')
This could be improved by comparing the type of valueInput and handling it appropriately if it is a string. Either that or I don't understand how to set this correctly in a single call. In my opinion, the userParameters.add() method should not accept a valueInput object but be accepting a string as it is done in the Fusion 360 GUI. It is cumbersom to create a valueInput object in the first place when a string could easily do what you want.
Just my opinion
-Blending 21st Century Woodworking with Old World Skill
Solved! Go to Solution.