Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
How to make a master configuration driving other assemblies? - linking/sync assembly configurations
I need configuration changes in a master assembly to update another assembly, how can that be done?
Example:
I have a partstudio with a ‘height’ configuration.
Let's say I have a ‘Masterpiece’ assembly (it's purpose is to help dimensioning in context)
and I have an “Printlayout” assembly (layout for 3D printing)
When I change the ‘height’ in ‘Masterpiece’ it does not reflect in “Printlayout” as I would have expected.
Part1:
Masterpiece:
Printlayout:
Now I change Configuration to High and get
However my ‘Printlayout” remains unaltered
How can I make changes to 'Masterpiece' configuration from 'low' to 'high' automatically update the 'Printlayout'?
Best Answer
-
rune_thorsen229 Member Posts: 182 EDUThaks to Alex_Kempen, I found a solution https://forum.onshape.com/discussion/16117/passing-a-variable-from-part-studio-a-to-part-studio-b#latest0
Answers
What you are proposing is that you have to change the configuration in "Masterpiece" and then again in "PrintLayout" manually.
The actual scenario is that we are in the last phase of a co-design & co-production project where people with cerebral paresis are involved in designing and making their own assistive device for eating, so my example is simplified. Specifically our patients will see the device in the 'Masterpiece' tab and select a configuration (shape of the tool) that they prefer. Then they will export the "printlayout" tab and drag it to the slicer program (CURA).
For that reason (intellectual disability) the workflow has to be extremely simple and I need a setup that allows for changing the configuration in one place only, "Masterpiece" where you can see the assembled result immediately. That configuration should be controlling the "PrintLayout" so it's ready for 3D printing.
1. I am looking into featurescript but cant figure out how to transfer the configuration params from one assembly to another.
2. I have been using a featurescipt where I change some 'global' params, but its too complicated for the user.
3. I have been trying to use subassembly but it doesnt update.
Ideally would be a GUI featurescript that would set my "height" parameter in the "Part Studio1" while you were looking at "Masterpiece" and of course update "PrintLayout" as if it was a truly global variable.
Right now i'm stuck so I would appreciate any help.
FYI configurations cascading down the assembly structure:
assy 4
-assy 3
--assy 2
---assy 1
----part 1
assy 4, assy 3, assy 2 & assy 1 have to have configurations for assy 4 to access the part 1.
You can't reach the part 1 from assy 4 without cascading down through all assy's. Each assy has to have configurations.
Read @Daniel_Kane response closely. Whenever you instantiate a part studio with configurations in an assembly, it's values begin with the default values.
Like Daniel says, we're not changing part 1, you've loaded a new instance of part 1, in your case 4 times and each can have their own values.
Onshape is different than Solidworks, SW would change part 1. OS doesn't change part 1, it creates a new instance of part 1 and then you can change it's values. In the assy PrintLayout, Daniel is controlling the configuration of each part 1 with an assy configuration. In my example above, you have to have this arrangement all the way down through the structure for it to work properly. At 5 levels deep, there's a lot of linking going on making the assignment cascade down through the structure.
My case in point, branch your document and look at the configuration values. The new branch instantiates new configurations and inserts the default values vs. the current values. Once again, no big deal as long as you know.
The configured top level assembly doesn't change the assemblies below it, rather it's more like "importing" the inserted components or assemblies with defined parameters.
Here's my take on what it sounds like you're trying to accomplish:
https://cad.onshape.com/documents/a1010a461a9f2e243fc3f0db/w/6869cd4cb9c4b30904a407b9/e/3b71d484cb05d9143293c7e7
It confirms that Onshape has not implemented truely 'global' variables that can be configured. The only workaround I have found is:
Have ONE assembly, importing all parts twice - one set is the 'design' mode and another set is the 'printout' mode. A configuration checkbox can suppress one or the other set. It's a lot of work and error prone..... sigh.
Thanks for your time.
I think about each part studio or assembly as a module that defines one or more objects. So, when "inserting" a part into a new assembly, you don't have any way to change the module definition, rather you can only create new instances of the objects defined by the module and set those object properties as needed through configurations.
Similarly, in a part studio, you can import (derive) and object and then modify its definition or add more properties, but you're not actually changing the definition of the original module (part studio).