- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
To find all parameters used in my design I use design.allParameters.count and iterate over the different parameters. In all new designs this work great, but on de sample files this will initiate a crash of Fusion 360.
I think it has to do with the time the design has been created, but I cannot confirm this with other designs.
When looking into the sample file Lamp I noticed that Sweep2 only gives me 1 parameter. I'm using the parameter menu to check this. When I edit Sweep2 and then close it again another 2 parameters get created; the taper angle and the twist angle. After adding these parameters the code will no longer crash Fusion.
The following code will crash Fusion when running it as a script on the sample files:
import adsk.core def run(context): app = adsk.core.Application.get() design = app.activeProduct paramCount = design.allParameters.count
Sure, now you'll think "Stop running that script on the sample files then!". Which is a fair advise, but here's my problem:
I'm trying to get an add-in published to the app store. The team at Autodesk that handles the applications for publishing test all add-ins using the samples files of Fusion 360. Obviously my add-in will not apply for approval as long as it can make Fusion 360 crash. (Which is a 100% of the time when you test it on the sample files)
There might be workarounds. I might be able to invoke a recalculation of the parameters by editing features of which I have tested that they are not conform the new parameters standards. However this will not prevent Fusion to crash on other 'old' design files.
Solved! Go to Solution.