Why does Revit return a formula that contains an exponent of zero (^0) with an inconsistent units warning? The logical (and legible) result of i.e. 5^0 is 1, but somehow Revit can't cope with that particular exponent.
Why does Revit return a formula that contains an exponent of zero (^0) with an inconsistent units warning? The logical (and legible) result of i.e. 5^0 is 1, but somehow Revit can't cope with that particular exponent.
Last edited by ikinks; October 19th, 2011 at 10:16 AM. Reason: doing the maths again, this time correct
5^0=1
1+1=2
etc.
1m^3 = 1m³, 1m^2 = 1m², 1m^1 = 1m, 1m^0 = ??? I would think this gives a unitless number.
Edit: it does not. Limit input to number values and you'll be fine.
Edit2: doesn't even do that. looks like you need a workaround if you need an exponential parameter.
value y would be 2^value x
value y = if (value x=0, 1, 2^value x)
Edit 3: probably pending
O, and edited Revit Formulas for "everyday" usage, the post that was meant to go down in history as my bestest post ever. So much for everlasting glory, tnx gaby424.
Last edited by ekkonap; October 19th, 2011 at 08:36 PM.
Well, I was fiddling with some formulas, trying to convert a binary code into a unique decimal number and for consistencies sake I wish the ^0 exponent works.
Binary code (8 bit in this case): 10110101
Breakdown:
A 1
B 0
C 1
D 1
E 0
F 1
G 0
H 1
Formula:
(A*2^7) + (B*2^6) + (C*2^5) + (D*2^4) + (E*2^3) + (F*2^2) + (G*2^1) + (H*2^0) =
1*128 + 0*64 + 1*32 + 1*16 + 0*8 + 1*4 + 0*2 + 1*1 =
181
Note that (H*2^0) doesn't work in Revit. Use (H*1) instead.
The number of the highest exponent should be the number of bits minus 1. Every next bit the exponent decreases by one.
Ever needed to calculate circular segments? Made this one earlier, to get the radial arrays right in this family, but figured that it might come in handy for something else, so saved it out at a early stage.
hi im have a made a family with several tick options,
P1 to P8
I would like to add a formula that is P1 is ticked then P2,P3 etc to P8 cannot be..is this possible?
i tried NOT (P2) but cannot add anymore
adding, so that you can only tick one box.
ie If =P8 you cannot put a tick in p1,p2,p3 etc
You might want to try a variation of what Steve Stafford describes in his blog post Revit OpEd: Make Up My Mind
not without some major formula work and extra parameters no. Keep asking yourself this question: what if I check off this one parameter? Is the action that needs to follow clear for Revit? Is there only one course of action? If not, it won't work.
The only way I can see this to happen is if you add a integer parameter (either manual or based on the outcome of a formula). Now reference the P1 to P8 parameters to the integer (for instance, formula for P1 would be: integer (place parameter name) = 1. Formula for P2 would be: integer = 2, and so on)