Hi!
I have a group with a nested family and a reference line inside it, and another reference line shooting off at 90° from the group. There is an angle dimension between the two ref lines and it is tied to an instance parameter I simply called ANGLE. When I change the value of the angle, the object simply rotates about the appropriate axis. All is working okay, BUT: what I need is to put Limits on the angle. It can't go below 1° or above 179°. For example. if the user typed in 0, or 0.5, or 179.5, it should put the angle back at 90° or something like that. I'm trying to do this via a formula in the Family Types dialog.
The trouble is that for the life of me I can't find/figure out how to write a formula that references this angle. I mean something like IF (angle<1, ... No matter how many different ways I tried to rephrase the formula, it always returns an error saying 'The following is not a valid family parameter: angle'. I know that 'length' is a valid parameter as I've used it in formulas prior, so why wouldn't 'angle' be?
Any idea how to write this kind of formula?
Many thanks,
0leg
When you reference a Parameter in a formula, you have to match the name EXACTLY, including case. So if your Parameter is named "ANGLE", then referencing "angle" in a formula will yield that error.
In order to create a "check" like that, you will need two parameters; one that controls the angle constraint (which will have the formula) and one in which the user inputs the desired angle value. The formula would be:
if( or( UserAngle < 1°, UserAngle > 179°), 90°, UserAngle )
Edit: And welcome to the Discussion Groups, by the way!
False alarm! I ended up getting the rotation to work such that it doesn't merit limits. I guess it kind of sweeps the issue under the carpet instead of solving it, but alas in interests of meeting a deadline for the time being that will have to do. Thanks a lot for advice anyway :]
Cheers!