Using Arrays with Variables

Dylan_Stewart
Dylan_Stewart Member, Developers Posts: 107 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_Stewart
    Dylan_Stewart Member, Developers Posts: 107 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