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.

Options

Conditional statement using array variables...possible?

Josy_LaJosy_La Member Posts: 82 ✭✭
edited September 2017 in Community Support
Hi,

Since I have no programming skills I want to see if I can control my model with only variables and conditional statement instead of feature script. I seem to have a problem with what I am trying to achieve. See below an example of the basics...but how can I formulate the statements to get what I need it to do.

Our product comes in standard lengths so I use a variable with an array of dimension. This length variable must drive my box dimension which also has predetermine sizes. Both array match meaning if length is 48" then box is 7" and so on. I'm guessing that because I am using array variables it might explain why it does not work.

Of course the best would be to have a selection table driven by FS but it is clearly not my forte.

https://cad.onshape.com/documents/673566b1c9083e56c26590e9/w/a8a84c50efeb95781c8b0398/e/69b47d8fbaf5dd23e4072185

Answers

  • Options
    Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    Hi Josy,

    I'm not sure I understand what your issue is, as it looks like the Part Studio you've created is pretty well-formed.  

    If the selections of box, width, and height always go together, why not create one #option variable and just use that instead of three separate variables that have to match.
    Jake Rosenfeld - Modeling Team
  • Options
    Josy_LaJosy_La Member Posts: 82 ✭✭
    Jake,

    Okay I understand now, I need only one variable to drive 2 dimensions. I will rename the option variables simple as that.

    Thanks

Sign In or Register to comment.