Ok, this is something that I already posted in another post but I thought it could be useful for somebody else... This i a way to round an array integer without using the "round [up or down]" function that is only available from 2012 version.
A formula to round an integer for an array quantity could now be read this way:
(Array length / 36") + 1.49
Last edited by alexo4141; June 21st, 2012 at 04:43 PM.
I thought this would be a useful addition to this thread on formulas. This applies to titleblock families:
Creating any 'A' sheet standard size by formula
Parameters:
X = horizontal side of the sheet; length parameter
Y = vertical side of the sheet; length parameter
A# = number of the 'A' size sheet. This parameter drives the height and width dimensions of the sheet; integer parameter.
Formulas:
X = Y / sqrt(2)
Y = 841 mm / sqrt(2) ^ (A# - 1)
Usage:
In a titleblock family, set the length units to millimeters. Create the 3 parameters, X,Y, and A#. Set the width of the titleblock to the X parameter. Set the height of the titleblock to the Y parameter. Now simply change the value of the integer parameter to obtain any 'A' size. It is not necessary to know in advance all the different sizes for the "A" sheet system. The formula will do that. The integer number matches the number of the "A" standard size. For example: you need a A1 size, then set the integer to 1. Since the value of the integer matches the name of the sheet size, its value can be used to drive other parameters in the family. See illustration.
Other ISO series
With a small variation in the formula for "Y", the same math works for obtaining all the sheet sizes of the B and C series, like this:
Series name
Y = A Series 841 mm / sqrt(2) ^ (A# - 1) B Series 1000 mm / sqrt(2) ^ (A# - 1) C Series 917 mm / sqrt(2) ^ (A# - 1)
Last edited by Alfredo Medina; August 8th, 2012 at 06:02 PM. Reason: Added series B and C
Welcome to the forum Martin, since you will have better luck posting this in the open forum I moved your post HERE.
Last edited by snowyweston; August 8th, 2012 at 10:10 AM.
The thing is, once ISO comes to town, math goes out the window. Compare the following formula and its results with the table in Paper size - Wikipedia, the free encyclopedia
X = round(1000/(2^(1/4+1/2*A#)))
Y = round(1000*(2^(1/4-1/2*A#))) edit (sorry about that)
A1 and A2 differ.
Last edited by ekkonap; August 8th, 2012 at 06:53 PM.
Ekko, if you refer to differences such as "594.7" different from "594", well, that is because the official ISO "A" list simply dropped the decimals, instead of rounding up or down in a consistent way, like the "round" formula in Revit does. But even like that, the results obtained by the formulas that I posted above comply with the standard, because the standards allow some tolerances in the range of 1.5 to 3 mm. depending on the size of the sheet. In this case, the differences between the results of the formula and the official rounded value are all of them less than one millimeter.
By the way, I did not understand how to use the formulas that you posted. It gives me the correct size for X, but not for Y.
Alfredo, the values obtained are indeed well within the tolerances, but that is not what tolerances are for IMO. If you're doing it by math ,why settle for tolerances? I did not know what caused the difference. Are you sure about dropping the last digit? That would result in 840 in stead of 841.
Sorry, formula edited. Zigged when I should have zagged.
dropping the last digit...
value - (value - rounddown(value))
Anyway, a little tweaking does the trick:
X=rounddown(1000.3/(2^(1/4+1/2*A#)))
Y=rounddown(1000.3*(2^(1/4-1/2*A#)))
that'll go straight into my next titleblock, tnx Alf!
Who knows, maybe the square meter was measured on a hot summer day. There's bound to be a story behind this.
Last edited by ekkonap; August 8th, 2012 at 07:42 PM.
- Well, to keep the formulas simple.
- No, I was not referring to dropping the last integer, but dropping any decimals and keeping the integers exactly as they are. I see that it might be possible to fix it with "rounddown" but I prefer to keep the formulas simple, as shown above; that gives the integer portion of the sizes exactly as they are listed in the official ISO series A,B, and C.
Last edited by Alfredo Medina; August 9th, 2012 at 03:50 AM.
Hey Guys! I was wondering if someone has figured up a way to return a string of text to relate a dimension to block module yet.
I'd like to have a parameter that says "Module" or "NOT" to make it easier on myself. I've figured out something that will work but it's time intensive and doesn't work totally parametric. See below. Please help!
After I wrote this up, I tried another way, and made it work. Posting the result if anyone wants to see it.
I used a Number parameter for Calc, and an Integer parameter for CALC. The number will only be an integer if it is module, therefore CMU Module will return a desired result, whereas when it's a decimal it wont be the same, thus the NOT...
Last edited by AHutchinson; September 8th, 2012 at 12:26 AM.
I'm having trouble implementing an 'if' formula in my window schedule.
I have a yes/no parameter in the schedule for a roller blind. This feature affects the S.O height, so i want to report the So.Height based on this yes/no parameter.
i have tried using
if(C = yes, A, B)
C is a yes/no parameter
A and B are a length parameter
I get an error saying that 'yes' is not a valid schedule.
Do the parameters need to be shared? i would have thought not as it is just calculating something from the schedule....
Any ideas?
Thanks in advance....