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.

Using Arrays with Variables

Dylan_StewartDylan_Stewart Member, Developers Posts: 106 PRO
I am having a difficult time trying to accomplish a sort of "option" selection with a variable driven model.
This is what I have so far.

#option = "number"
#customWidth = "length"
#width = [10,20,30,40,50,#customWidth][#option]
#customHeight = "length"
#height = [30,40,50,60,70,#customHeight][#option]

I'm trying to sketch a cube using the variables where

Width dimension = #option<=4?#width: (#option=5?#customWidth))
Height dimension = #option<=4?#widht: (#option=5?#customHeight))

There might be an obvious reason this is not working....? 

Here is the link to the document. 
https://cad.onshape.com/documents/895e301bfebbbd68e10e7cbe/w/80a786217c7f4b8c6a9c92e4/e/a192d6f7e85074b279afb60c
Digital Engineering

Best Answer

Answers

  • Dylan_StewartDylan_Stewart Member, Developers Posts: 106 PRO
    I also would like to be able to use the "option" functionality with features (extrude, pattern etc...)

    Is this even possible in OS?
    Digital Engineering
Sign In or Register to comment.