I'm trying to create formulas based on trigonometric functions to define parameters in a family (I'm using Revit 2017). According to the Revit documentation, the basic trig functions should be available; the "valid formula syntax" for them (sine, cosine, tangent, arcsine, arccosine, arctangent) are all defined here:
http://help.autodesk.com/view/RVT/2017/ENU/?guid=GUID-B37EA687-2BDF-4712-9951-2088B2A8E523
However, even the simplest formulas I create based on trig functions bring the error:
"The following is not a valid parameter: cos 4
Note that parameter names are case sensitive."
(In the above example, the formula I entered was "cos 4/3". I get an equivalent message for any other formula based on trig functions.)
This suggests to me that Revit doesn't actually recognize the trig abbreviations (sin, cos, tan, asin, acos, atan) for these functions; when I enter them Revit thinks that I'm trying to enter the names of parameters that aren't defined. Note that these are the abbreviations that the aforementioned link says are supposed to be valid in Revit. I have also tried nonabbreviated versions (e.g. sine, cosine, arctan, arctangent), with the same result.
As a test, I tried out some formulas using abbreviations/syntax for mathematical operations that AREN'T trig functions: "sqrt" for square root, "abs" for absolute value. Those worked as expected. So it's not that my basic approach is wrong, such as how to enter these formulas in the first place. It really seems like Revit just doesn't recognize the syntax that it's supposed to recognize.
Any ideas?
Solved! Go to Solution.
Solved by ToanDN. Go to Solution.
Angle Parameter =acos(4/3).
See two examples hereunder
You have to make sure that the result on the left and right of the equation come to the same unit
Louis
Please mention Revit version, especially when uploading Revit files.
Well...shoot....was going to share the cheat sheet for all things formula related at revitforum.org but we are currently switching over the site to another provider. When we are back up again I'll post the link here.
Is this what you were looking for, @Anonymous ?
https://www.revitforum.org/tutorials-tips-tricks/1046-revit-formulas-everyday-usage.html
I was thinking of Munkholm too, but couldn't access Revit Forum yesterday. In fact, I haven't been able to access the site for the last two weeks. Today; no problem.
Hi @Anonymous. Any update on this? I think they didn't get the problem.
Same issue on my end. I'm aware of the valid formula syntax to use but Revit did not recognized it. Is there any problem or missing in my Revit software?
@Anonymous wrote:I'm trying to create formulas based on trigonometric functions to define parameters in a family (I'm using Revit 2017). According to the Revit documentation, the basic trig functions should be available; the "valid formula syntax" for them (sine, cosine, tangent, arcsine, arccosine, arctangent) are all defined here:
http://help.autodesk.com/view/RVT/2017/ENU/?guid=GUID-B37EA687-2BDF-4712-9951-2088B2A8E523
However, even the simplest formulas I create based on trig functions bring the error:
"The following is not a valid parameter: cos 4
Note that parameter names are case sensitive."
(In the above example, the formula I entered was "cos 4/3". I get an equivalent message for any other formula based on trig functions.)
This suggests to me that Revit doesn't actually recognize the trig abbreviations (sin, cos, tan, asin, acos, atan) for these functions; when I enter them Revit thinks that I'm trying to enter the names of parameters that aren't defined. Note that these are the abbreviations that the aforementioned link says are supposed to be valid in Revit. I have also tried nonabbreviated versions (e.g. sine, cosine, arctan, arctangent), with the same result.
As a test, I tried out some formulas using abbreviations/syntax for mathematical operations that AREN'T trig functions: "sqrt" for square root, "abs" for absolute value. Those worked as expected. So it's not that my basic approach is wrong, such as how to enter these formulas in the first place. It really seems like Revit just doesn't recognize the syntax that it's supposed to recognize.
Any ideas?
@fambrocio wrote:
See sample. Not sure what's the problem.
This one is failing because of units, just as the error says.
In this case parameter "B" is expecting a unit type of "Angle". The formula you have put in does not return a value as an Angle. It returns a simple ratio. Just a number. "Numbers" are not "Angles"
@Anonymous wrote:
I'm trying to create formulas based on trigonometric functions to define parameters in a family (I'm using Revit 2017). According to the Revit documentation, the basic trig functions should be available; the "valid formula syntax" for them (sine, cosine, tangent, arcsine, arccosine, arctangent) are all defined here:
http://help.autodesk.com/view/RVT/2017/ENU/?guid=GUID-B37EA687-2BDF-4712-9951-2088B2A8E523
However, even the simplest formulas I create based on trig functions bring the error:
"The following is not a valid parameter: cos 4
Note that parameter names are case sensitive."
(In the above example, the formula I entered was "cos 4/3". I get an equivalent message for any other formula based on trig functions.)
This suggests to me that Revit doesn't actually recognize the trig abbreviations (sin, cos, tan, asin, acos, atan) for these functions; when I enter them Revit thinks that I'm trying to enter the names of parameters that aren't defined. Note that these are the abbreviations that the aforementioned link says are supposed to be valid in Revit. I have also tried nonabbreviated versions (e.g. sine, cosine, arctan, arctangent), with the same result.
As a test, I tried out some formulas using abbreviations/syntax for mathematical operations that AREN'T trig functions: "sqrt" for square root, "abs" for absolute value. Those worked as expected. So it's not that my basic approach is wrong, such as how to enter these formulas in the first place. It really seems like Revit just doesn't recognize the syntax that it's supposed to recognize.
Any ideas?
"cos 4/3" is a wrong syntax, it should be "cos (4/3)"
Just for the benefit of others reading this post, the first help link provided is from 2017
http://help.autodesk.com/view/RVT/2017/ENU/?guid=GUID-B37EA687-2BDF-4712-9951-2088B2A8E523
That page was updated recently (2019?) to provide better examples and syntax for the functions used in formulas.
http://help.autodesk.com/view/RVT/2020/ENU/?guid=GUID-B37EA687-2BDF-4712-9951-2088B2A8E523
Hi Guys, Really need your help about this.
i want to get the angle of triangle with this formula,
it always says inconsistent units. can you help me please? thanks a lot.
here's my syntax for the parameters inside the family i'm creating.
=acos((B^2)+(C^2)-(A^2) / (2 * (B * C))
Can't find what you're looking for? Ask the community or share your knowledge.