Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
Search
-
Using Arrays with Variables
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… -
Re: Using Arrays with Variables
Dylan and I solved this together in the document! For everyone else: The original definition was set up like: #option = 5 #customWidth = 10 in #width = [10, 20, 30, 40, 50, #customWidth][#option] in But if option 5 was selected, the whole thing broke because resolving option 5 gives "10 in in" Solved by changing to:…
2 results