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.


Variable in Assembly - based on two Configuration Lists

kvdmolenpkvdmolenp Member Posts: 6 ✭✭
edited December 2022 in General
I'm working on a configurable Winch.

Configurable Lists are for example:
  • Motor size
  • Break size
Motor size and Break size are Assembly-level Configuration Lists.

I want to calculate the final required shaft-length, based on the two Configuration Lists.

For example:

  • Motor1 = 30mm
  • Motor2 = 40mm
  • Motor3 = 50mm
  • Break1 = 20mm
  • Break2 = 30mm
  • Break3 = 40mm

ShaftLength = SelectedMotorLength + SelectedBreakLength + 50mm (for example)

In a Part Studio this would easy (setting a local variable for each list separately, and then adding the two variables).
But how to achieve this in an Assembly?

I can't put all sub-systems in one single part-studio...
Variable Table's don't seem to cut it.
Neither are local variables (still not) available in Assemblies.

Please help?

Klaas van der Molen


  • Options
    eric_pestyeric_pesty Member Posts: 1,504 PRO
    If I understand correctly, I think you should be able to model your shaft so that it can take two separate configs inputs to set the length: a "base length" set to the "motor" for example and a separate feature (like a move face or example) to extend the length by and amount configured by "break".
  • Options
    tim_hesstim_hess Member Posts: 46 ✭✭
    This is possible by duplicating your assembly configurations within your part studio. 

    Your assembly can have configurations for Motors and Brakes. Then, the part studio should also have the same configurations (Motors, Brakes). Then, you use your formula to calculate the shaft length in the part studio. Once you add a shaft to your assembly, use the assembly configurations for Motor and Brake to drive the matching Motor and Brake configurations of your shaft. 

    Here's a simple example: Assembly Config Test | Assembly 1 (onshape.com)

    The downside to this is that it's a little bit extra work to set up, and if you add/remove configurations, you'll need to update both the assembly and the part studio.

  • Options
    eric_pestyeric_pesty Member Posts: 1,504 PRO
    What I mentioned earlier also required using the same configuration trick as explained more clearly by @tim_hess427.

    One option is to setup the the part studio with configuration variables (rather than lists), then you can add new combinations (i.e. an extra motor size or whatever) to your top level without having to edit the part studio.
  • Options
    kvdmolenpkvdmolenp Member Posts: 6 ✭✭
    edited December 2022
    Thanks for the hints, that would indeed work.

    I thought it would lead to inter-depending sub-assemblies, but the casing sub-assembly does indeed depend on all the options, so it should fine.

    Many thanks,
Sign In or Register to comment.