I am working on a project where I have to assign angle parameters to Dimension built-in group in Revit API c#
Here the angles are available in degrees as shown below
When I set the value in degree (say 11.5 degree) directly I get an error which says "Constraints not satisfied"
So I added the code to convert degree to radian, but even this fails.
My current code below
FamilyManager famManager = famDoc.FamilyManager;
double angle = 11.25; //value in degree
double dn = angle * Math.PI / 180; //Converting degree to radian
FamilyParameter fp = familyManager.get_Parameter("BEND ANGLE");
if (fp != null)
{
familyManager.Set(fp, values);
}
Another method that I tried
double dn = UnitUtils.ConvertToInternalUnits(angle, DisplayUnitType.DUT_DECIMAL_DEGREES);
I am getting the same error.
Let me know if I am doing something wrong.