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 add global variables to a configuration

john_robinson568john_robinson568 Member Posts: 11
Hi All,

I have a project that contains multiple part studios and assemblies. It also has a variable studio that contains all global variables. I am trying to create a (list) configuration that will set the value of some of those global variables. I've created configurations before, and setting the value of a local (ie in the feature list) variable is easy, but I can't figure out how to set values of global variables. I've tried creating the configuration from a part studio and from an assembly, and I can get it to work either way. Any help much appreciated :)

Cheers, John


  • john_robinson568john_robinson568 Member Posts: 11
    Does anyone have any suggestions on how to do this please?
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 4,791
    Global variables are top down only and can’t be configured. You could swap the global variable that you use at a part/assembly level by using an array like so: [#var1, #var2, #var3][2] where the “2” is the selected value and the result would be #var3
    Director, Technical Services, EMEA 
  • eric_pestyeric_pesty Member Posts: 1,043 PRO
    The downside with this approach is that you would have to manually propagate the configuration through every assembly/part where it's used, which defeats the purpose of it being "global".
    I understand there are probably some "interesting" ramifications but the ability to configure a variable studio to affect every downstream part/assembly would be really helpful for configurable models!
  • john_robinson568john_robinson568 Member Posts: 11
    Thanks Neil and Eric for the replies, I appreciate your help :)
Sign In or Register to comment.