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

Variables inside variables with math

weston_koffordweston_kofford Member Posts: 5 EDU
so I am modeling a bottle but I want to be able to change a few numbers and end up with a smaller or bigger bottle

I'm using the pithagriam therum to get a wall and have this and both of these variables are assigned

BottleDim=30mm
BottleNeckHeight=80
BottleSideAngle=((BottleDim/2)^2+BottleNeckHeight^2)

Can someone explain why this doesn't work? if you need more info tell me and I can get it and update the post

Comments

  • Options
    NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,432
    BottleDim has units, Height does not. BottleDim^2 is an area not a length. Balance out the units or remove them altogether. 
    Senior Director, Technical Services, EMEAI
  • Options
    weston_koffordweston_kofford Member Posts: 5 EDU
    NeilCooke said:
    BottleDim has units, Height does not. BottleDim^2 is an area not a length. Balance out the units or remove them altogether. 
    Sorry that was a miss type it does have units and I'm performing an equation to find a length...
  • Options
    NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,432

    BottleDim=30mm
    BottleNeckHeight=80mm
    BottleSideAngle=sqrt((#BottleDim/2)^2 + #BottleNeckHeight^2)
    

    Senior Director, Technical Services, EMEAI
  • Options
    Nath_McCNath_McC Member Posts: 114 PRO
    edited October 2022
    Removed the comment as I missed Neil's solution.
Sign In or Register to comment.