I tried looking for this topic & although I am sure it is around somewhere I was not able to find it so I apologize.
So I have all of my family (Scheduled) Parameters set as well as the typical LxWxH Params I need. I was trying to set a parameter formula if(3 = 1/32", 2 = 1/32", Stay). I am unaware if this works but I would like help with my formula or any information that could explain these scenarios for me. As it is right now, Revit is saying "Inconsistent Units" but I cannot null it out or figure it out, they are all length parameters in inches & I have tried /1 or *1 but get nothing. I have successfully used "if" formulas before but never for a numerical value, only text params.
In this formula are three Length parameters, 2, 3, & Stay. 2 is the param that this formula is for, 3 does not have a formula, & Stay's formula is 2 Parameter.
If any, is there a better way to accomplish this or am I just using parameter formulas dead wrong?
(Pro Question: Under an if(x,x,x) formula what are your suggestions on the take if(Param, True, Do nothing). Is it possible? I find myself still trying this every now and then & even my latest formula in this post kind of tries to play on this & I am not even sure it works. My thoughts were to have "Do nothing" be another parameter that pulls that current parameter's value if the True wasn't.)
Gelöst! Gehe zur Lösung
Gelöst von bin. Gehe zur Lösung
If your parameters are just named with a number eg. 3 this will cause issues as Revit will not see it as a parameter name but as a number and 3 can never = 1 if your parameter name was three instead you could use your formula. Parameters should always be alphanumeric, without spaces or operation characters such as =, +,-,*,/. I always use CamelCase for my parameter names and never use numbers.
I got if([3] = 1/32", 1/32", 2") to work according to my intentions as posted although I am unaware of the implications of my 'false' value where 2" was the default constraint for my geometry so as of right now I believe this works.
I believe I fixed my formula issue but if there is anybody out there with extensive knowledge on formulas or know where I could find more detailed information please still let me know. I understand the basics but I keep getting hung up on little nuances that I may or may not be aware of. Please don't link a super generic formula syntax page I have 10 or so saved for reference, unless it seems to have a ridiculous amount of information then please do.
Thank you for replying! I actually replied to my post apparently at the same time & did not see yours until after.
Now that's what I am talking about! That kind of detailed info that I can't seem to find anywhere else, I did not know that generically numbering named parameters was a poor decision, although hindsight... I can not seem to find what I would call a "Best practice" guide for family/content creation. I also found out about the operators in names was an issue a few days ago because I had a parameter that was 'Prefix - Param' named, which was also sorted out but I wasted time learning the hard way still...
Lastly, camelcase? Naming params with 2 uppercase letters & no spaces?
Thanks so far!
You need to tell Revit what that is, eg [2] is a parameter name, 2 is a number or length, etc. and “2” should be a text. I when I was lazy I just name my parameters W1,W2(width),D1,D2(depth) something like that.
your parameter for 2 should be if ([3]=x, y, z), not if([3]=x, [2]=y, z). And I don’t think you can do if([3]=x, y, [2]). You can either leave them blank and manually type in, set the z a fixed figure or formula that does not link back to [2], or do something like if([3]<a,b,if([3]<c,d,if([3]<e,f,g))).
try this:
create a new parameter lets say 2x and link it to the geometry replacing the [2] parameter.
Then add formula if([3]=x,y,[2]) to 2x.
Still in bed, let me know whether it works or not. ![]()
Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.