Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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

rune_thorsen229rune_thorsen229 Member Posts: 182 EDU
edited August 2021 in Community Support

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.

https://cad.onshape.com/documents/81435cbe69ad007199e1d581/w/1636a278312756d649105c41/e/6710e13460317f24d5d14c45

Let's say I have a ‘Masterpiece’ assembly (it's purpose is to help dimensioning in context)

https://cad.onshape.com/documents/81435cbe69ad007199e1d581/w/1636a278312756d649105c41/e/0b103fe1df4c3e4d44fb12fe

and I have an “Printlayout” assembly (layout for 3D printing)

https://cad.onshape.com/documents/81435cbe69ad007199e1d581/w/1636a278312756d649105c41/e/ca7426d35064ce48c562d969



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'?

PS: I know I could rightclick and use change configuration for the 'Masterpiece' features in the 'Printlayout' but that is not feasible for my situation.

Answers

  • Daniel_KaneDaniel_Kane Member, Onshape Employees Posts: 23
    Hi Rune. Configurations in Onshape only control the environment they are defined in (Part Studio, Assembly, etc.). However, you can use assembly configurations to drive the geometry you are referencing. As you mentioned, you have the ability to "change configuration" in the 'Printlayout' environment. This can be done for all 4 entities at once using a configuration, shown in the GIF below. Would this work for your workflow?

  • rune_thorsen229rune_thorsen229 Member Posts: 182 EDU
    Daniel_Kane , that is how it works in "Masterpiece" assembly, but it doesn't drive the "PrintLayout".
    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.

  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,071 PRO
    edited August 2021
    @rune_thorsen229

    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.





  • rune_thorsen229rune_thorsen229 Member Posts: 182 EDU
    billy2 Thanks, I would really appreciate if you could make a simple working example because It doesn't work for me.

  • tim_hess427tim_hess427 Member Posts: 648 ✭✭✭✭
    @rune_thorsen229 - I think, to make your example work as you like, you need to add a configuration to PrintLayout. You can add "low" and "high" configurations which then drive the configuration of whatever parts or sub-assemblies are added, like your "Masterpiece". 

    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

  • rune_thorsen229rune_thorsen229 Member Posts: 182 EDU
    tim_hess427 that clarifies a lot. So we can NOT have a "masterpiece" which we use to configure the design that we printout using 'PrintLayout'. You need to manually carry over the 'high/low' selection from the 'Masterpiece' assembly to the 'PrintLayout' assembly. 
    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.
  • tim_hess427tim_hess427 Member Posts: 648 ✭✭✭✭
    Yea - I'm still looking forward to sharing variables between studios as well.

    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). 

Sign In or Register to comment.