I'm designing a linear building foundation that needs to space studs equally along the length at no greater than 5' on center. I've got it worked out for lengths divisible by 5', but at certain lengths I can't make it work out evenly. The hangup is in the "Copies" bit of my stud attributes. For example, when I try a 16' length, my copies formula outputs 3.2, and I need it to be 4. That would be easy if I had access to a roundup function, but it seems none exists. So I tried to workaround by changing the formula to "=1+FLOOR(rail!LenY/60,0)" where "rail" is the floorplate. In this case, the input for "rail!LenY" is 192" (16 feet). I know that 1+FLOOR(192/60) is 4, but for some reason when I view the plain data output of the "Copies" attribute, it says "1".
My parent component has a custom attribute called "spacing" to determine the y position of the studs. That formula is "=(rail!LenY/leg!copies)2.25", where "rail is the floorplate, "leg" is the stud, and 2.25 is the thickness of the stud (I'm measuring 5' on center, and the spacing is asking for inside to inside measurements).
Now, the truly baffling part: The end goal is to save the component as a 1' section of floorplate to make it easy to scale (i.e., 1' scaled to 20 equals a 20' floorplate; 1' scaled to 68 equals a 68' floorplate). If I scale the 1' section to 16' with the "Copies" attribute blank, then insert the formula above, it works perfectly. What gives? Screenshots below:
I need a ROUNDUP function
7 posts
• Page 1 of 1
I need a ROUNDUP functionLast edited by twdant on Tue Apr 29, 2014 8:35 pm, edited 1 time in total.
Re: I need a ROUNDUP functionIsn't there a Ceil function?
My website: http://juliachristinaeneroth.se/
Re: I need a ROUNDUP functionIf I use the ceiling function on the 1' piece, it ouputs "1" when I lengthen the component to 16'. If I leave the formula blank, lengthen it, then input the ceiling formula, it works.
I guess the problem isn't so much with the formula as it is with the timing. Any time I input a correct formula on the 1' piece, it doesn't work on any length not divisible by 60". EDIT: I think this problem is like an evolving virus. Re: I need a ROUNDUP functioni *think* one thing that is going on is you have 2 formulas that rely on the COPIES attribute  one in the parent and one in the child. The Parent formula does not get updated until the next "refresh" of the component since it has already completed it's calculation before the COPIES in the child attribute is udated.
Move the "spacing" attribute from the parent to the leg component and see if things start behaving better. Don't forget to change the leg:Y formula to use the "spacing" from leg instead of baserail!spacing. Hi
Re: I need a ROUNDUP function
You're welcome. Are you making any progress? Hi
Re: I need a ROUNDUP functionAbsolutely. That problem is fixed and I've moved on to another problem with a different component. If you get a chance, take a look at my "Help close the gap" thread. I'd sure appreciate any help you might be able to offer.
7 posts
• Page 1 of 1
