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.

Creating relations between dimensions

gustavo_chellesgustavo_chelles Member Posts: 2 PRO
Hi, I would like to create relations between dimensions, something like d2=d1+3, but I don't find the way of doing this.  Can anyone give me a tip?

Comments

  • jelte_steur_infojelte_steur_info Member Posts: 587 PRO
    Hi gustavo,
    this can be done using variables:
     Create a variable named 'd1' (it'll appear in the feature tree)
     In a feature or sketch, you can type a formula. type "#" and you'll see a list of parameters you've created (you can even create one there and then).

    when you type in a sketch for a dimension "#d1 + 3" it won't work because it can't add numbers to millimeters or inches.
    so type "#d1 + 3 mm" and it'll work.

    you can also go ahead and create a new variable. name it "d2" and the value can be calculated.

    good luck
  • robert_scott_jr_robert_scott_jr_ Member Posts: 681 ✭✭✭
    Hello Gustavo. Create a variable named d1 and assign a value to it. If the value is 2 and you are working in inches It will look like this: #d1= 2in   . Now you can use d1 in the equation for d2 but you must add a unit type to the 3. When you are beginning to enter d2's dimension, hit the pound(#) key. This will call up a list of created variables and you can select d1 and go on from there. d2's dimension should look like: #d1+3in - Scotty
  • Ashley_DowleAshley_Dowle Member Posts: 2

    Any idea if this is going to be addressed? It seems a bit crazy to me that I have to create a variable external to the sketch. Often I will just want to make another dimension half of the referenced one (for example). I would not want the referenced dimension to have a representative variable cluttering up the variables table, which I would generally reserve for significant parameters. I've not used a CAD program that does not allow other dimensions to be referenced within the sketch.

  • S1monS1mon Member Posts: 3,746 PRO

    For something as simple as one dimension being half another, I just use construction lines as necessary and set them to be equal.

    Screen Recording 2025-11-23 at 8.02.08 AM.gif

    Simon Gatrall | Product Development Specialist | Open For Work

  • martin_kopplowmartin_kopplow Member Posts: 1,065 PRO
Sign In or Register to comment.