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.

Linear Patterns and Variables

ryan_ameyryan_amey Member Posts: 5
I work for a small structures manufacturer and am playing around with OnShape to see if it would be better suited for our purposes than using SketchUp. One of several goals we want to achieve with whatever software we use is utilizing variables and constraints to enable altering the dimensions of a building and having every aspect of the building change along with the size. This means longer plates, cladding, beams, ridgebeam, rafters, rafter placement, etc and all while maintaining the proper geometry for the building like roof pitch, for example.

I am well on my way but am hung up on a linear pattern. We place all of our side rafters 1" from the end of the ridge and then 12" there on until the other end of the ridge where we land again at 1". I have a linear pattern set up but am uncertain how to link the pattern to a variable so that if I add 2 feet in length to the building that the pattern will add 2 more rafters but still stop at the end of the ridge. I basically am looking for the instances to be a variable.

I have a variable set up for ridge length and I believe that the formula should be (RidgeLength-2")/12" to arrive at a whole number for rafter count.


Comments

  • eric_pestyeric_pesty Member Posts: 1,786 PRO
    I'm not sure 2" works, try 2 in instead.
    Also if you are dividing you should add brackets to ensure you are dividing by the unit:
    if you type: "somelength/2*in"  it will evaluate to "(somelength/2) * in", so use "somelength/(2*in)" to make sure you get a dimensionless number.

    I'm guessing if you mouse over your variable with the error it will tell you your result is not "number" but has a unit value (probably in^2)
Sign In or Register to comment.