I am trying to set up a reporting angular parameter in an adaptive component family.
When I use the reporting parameter in a formula I get this error:
"A reporting parameter can be used in a formula only if it's dimension references are all to host elements in the family"
What I tried at first is to make sure that when I set up the angular dimension it is referenced to reference lines. But still I get the error.
After that I found this piece of info on Revit Forum with Alfredo Medina saying in post 3 that:
"
angular reporting parameters (...) can detect and report the angle between (...) the angle of a reference line and one of the planes of an adaptive point
"
So I tried that as well. But it still doesnt work.
I will attach the family. The reporting parameter 'hoek_reporting' is already set up.
Now I want to use it in a formula for parameter 'seg', with the formula being: seg = Lx1 / sin(hoek_reporting).
I keep getting the error. Hope somebody can help me out!
@bin wrote:
Try to get this angle.
Thanks for you reply! It looks like you created an angular dimension between a placement point plane and a reference line 'end'-plane, am i correct?
Sadly I am not able to reproduce that
My placement point planes are visible, but my reference line 'end'-plane is not. If I set work plane to reference line 'end'-plane I cannot reference to placement point plane.
Can you describe to me exactly the what you did to create yours? Many thanks in advance!
it Looks like that work plane(perpendicular to the reference line) only exist when there is only one reference line defined by that control point.
What you can do is to place a point on that placement point and use the new point to define the other reference lines.
Let me know if this works or not. I’m also new to this.
Next thing I tried:
-create a dummy reference point on Z=0
-set the work plane to vertical plane front/back
-create a vertical dimension between PlacementPoint1 and Dummy Point (PP1_Z)
-create a vertical dimension between PlacementPoint2 and Dummy Point (PP2_Z)
-try to use these values in a formula: testlength = PP1_Z - PP2_Z
.. Still the same error.
Placement Points and Reference Points are both 'Host Elements', right?
I also tried referencing PP1 and PP2 towards 'Ref.Level', which imo definitely is a 'Host Element'. Also did not work.
I think in your family, the only report parameter that you can use in your formula is the length between the 2 points and possibly the angle formed from the points and the perpendicular work plan(not even the reference line between).
Its a bit late here and I’ll try it tomorrow. ![]()
@bin wrote:it Looks like that work plane(perpendicular to the reference line) only exist when there is only one reference line defined by that control point.
What you can do is to place a point on that placement point and use the new point to define the other reference lines.
Let me know if this works or not. I’m also new to this.
You my hero!
I started off with drawing a single reference line. As you said, as long as there is nothing else attached to it, then both work planes exist. So i was able to angular dimension those planes. And I also was able to use the dimension as a reporting parameter in my formulas. End result is fine!
Many thanks
I have managed to create the dimension so that it does not disappear upon moving the placement points.
But now it keeps flipping back and forth so I cant really use it.
I think it’s fine.
Because cos(a)=-cos(180-a)=cos(180+a)=-cos(360-a)
You just need to use if() to make the final result a positive number.
Just make sure that the angle does not equal to 90.
You're probably right, but I cant really get my head around that for a quickfix. Plus, sometimes angle will be 0.
I did a workaround for now:
-I added two more placement points (pp1', pp2') which will be placed exactly below pp1 and pp2, and both on Z=0
-From there I measure height between pp1<>pp1' = pp1height, pp2<>pp2' = pp2height
-Then I compare pp1height and pp2height, which gives me height difference between pp1 and pp2 (this can be 0)
-That value, along with the line length between pp1 and pp2 will give me an angle.
I can work with that for now.
Thanks anyway @bin ! I might do further research some other time.
Since you are using the formula a=b/cos(A), although the dimensions of the angle flips around and give you the figure of A,180-A,180+A and 360-A randomly, the result of cos(A) will be either c or -c.
For example you move the points so the angle equals 60 degree and you expect to get the cos(A) as 1/2, but the dimension might flip to the other side of the reference planes and give you the figure of 120, 180 or 300. Cos(120)=-1/2 , cos(180)=1/2, cos(300)=-1/2. So you can just use your formula and make sure it’s not negative.
I did a search and looks like you can use abs() for this situation.
Also this formula will not work when the angle A become 90 because you can’t divide a number by 0, what I can think of is to create another parameter c, so a=b/c, and c= if(A=90,x,cos(A)) something like this.
I don’t think your 2 extra points workaround will work as expected because those 2 points will not alway stay right below the other 2 points.
Please let me know whether it works or not, or if you have other ideas or better solutions.
For example, you move the points so the angle equals 60 degrees and you expect to get the cos(A) as 1/2, but the dimension might flip to the other side of the reference planes and give you the figure of 120, 180 or 300. Cos(120)=-1/2 , cos(180)=1/2, cos(300)=-1/2. So you can just use your formula and make sure it’s not negative.
Sorry, I did some mistakes, 180 should be 240, cos(240)=-1/2 and cos(300)=1/2.
Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.