Community
Fusion Design, Validate & Document
Stuck on a workflow? Have a tricky question about a Fusion (formerly Fusion 360) feature? Share your project, tips and tricks, ask questions, and get advice from the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sharing Parameters in Parametric Modeling

12 REPLIES 12
Reply
Message 1 of 13
jagboy2013
1604 Views, 12 Replies

Sharing Parameters in Parametric Modeling

Is there a way to share parameters between designs?  After spending about 6 hours making a set of relatively minor changes that would've taken perhaps in hour in Solidworks, I've gotten fed up with how "brittle" designs become when using "Project" to drive features, and would like to instead break the design into separate component files, but have them all share a common set of parameters that define major dimensions, features, interfaces, etc.  Is that possible?

 

Regards,

Ray L.

12 REPLIES 12
Message 2 of 13
TrippyLighting
in reply to: jagboy2013

You cannot share parameter across several separate files.

You can, however share parameters across many components, as long as they are created in one design file (not with linked components).

 

If you can share you design we can possibly give more specific advice how to get things done.

Peter Doering
Message 3 of 13
etfrench
in reply to: TrippyLighting

You can create a parameter master file using an app: https://apps.autodesk.com/FUSION/en/Detail/Index?id=1801418194626000805&appLang=en&os=Win64

 

You will still have to update each file whenever a new parameter is created or one is changed.

 

 

ETFrench

EESignature

Message 4 of 13
jagboy2013
in reply to: etfrench

Thanks!  I can't believe that isn't built into Fusion - it's got to be a trivial thing to add...

 

Regards,

Ray L.

Message 5 of 13
jagboy2013
in reply to: jagboy2013

Sadly, that plug-in appears to be absolutely horribly written.  It exports the parameters fine, but won't even read in a .csv file it wrote itself!  When I try, Fusion simply hangs.  If I modify the .csv file then save it in Excel, and try to import it, I get an error dialog (list index out of range on line 226 of the Python script that implements the plug-in) - it is apparently not happy that there are no comment fields in the file.  If I put in dummy comments, then I get a different error!  It's written in Python, so if I get really bored, I dig into and fix it....

 

This capability REALLY should be built into Fusion...

 

Regards,

Ray L.

Message 6 of 13
jagboy2013
in reply to: jagboy2013

Yikes!  When that plug-in does work, it is horrendously slow.  As in 2-3 seconds PER PARAMETER!  A file with 120 parameters takes 2-3 MINUTES to load!  The main loop of the script is only about 20 lines, and nothing in there is the least bit complex or compute-intensive, so it seems to be something in the csv library it calls, or, more likely, the interface it's using to communicate with Fusion to set the parameters.  Nothing I can see to improve there....

 

Regards,

Ray L.

Message 7 of 13
etfrench
in reply to: jagboy2013

There's always C++ Smiley LOL

ETFrench

EESignature

Message 8 of 13
jagboy2013
in reply to: etfrench

I'm actually working on writing my own script using javascript to do the parameter import/export.  I can already read all the parameters...

 

Regards,

Ray L.

Message 9 of 13
jagboy2013
in reply to: jagboy2013

Progress!  I'm very rusty on javascript, and this is the first I've seen of the Fusion APIs, but after about an hour of work, I have half a page of javascript that exports all of the parameters from a design!  Now to move on to the import side!

 

Regards,

Ray L.

Message 10 of 13
etfrench
in reply to: jagboy2013

What's the time per parameter?

ETFrench

EESignature

Message 11 of 13
jagboy2013
in reply to: etfrench

Not sure what you're asking.  I already indicated the Python scripts runs 2-3 seconds PER PARAMETER.  I don't have import working yet in Javascript.  My big fear is that it will likely turn out the same.  I suspect the API does a full rebuild of the project after each parameter is updated.  If that's true, then this method will be a major PITA, as it could easily take 10 minutes to read in all parameters for a large project.  But I will try to "filter" what parameters get read/written, so it doesn't do all the auto-generated ones, just the user-named ones, which will at least help a lot.

 

Regards,

Ray L.

Message 12 of 13
jagboy2013
in reply to: jagboy2013

Well, I now have working parameter export and import scripts, written in javascript.  I suspect they are no faster than the Python ones, but at least I understand them!  The one major functional change I made is I export ONLY User Parameters, where the existing Python script exports ALL parameters.  This alone speeds things up considerably.  Updating 100 parameters takes 12-18 seconds, depending on how many are new, and how many already exist - creating new parameters is a bit faster.  Mine is also implemented as separate export and import scripts, rather than a single does-it-all plug-in.  But, I'm happy with the result, and will start using it for real work.

 

The scripts are below...  Just unzip into your scripts subdirectory (in Windows -> C:\Users\YourUserName\AppData\Roaming\Autodesk\Autodesk Fusion 360\API\Scripts), then run using the File->Scripts & Addin-Ins dialog).

 

Regards,

Ray L.

Message 13 of 13
jagboy2013
in reply to: jagboy2013

Slightly improved versions below...

 

Regards,

Ray L.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report