I want to create circle as filled region
public FilledRegion CreateFilledRegion(Document _doc, XYZ centre,double radius ,ElementId fillTypeId, ElementId lineStyleId, ElementId viewID)
{
var circle =Arc.Create(centre, radius, RevitUnitConvertor.DegToInternal(0),
RevitUnitConvertor.DegToInternal(360), XYZ.BasisX, XYZ.BasisY);
List<CurveLoop> profileloops = new List<CurveLoop>();
CurveLoop profileloop = new CurveLoop();
profileloop.Append(circle);
profileloops.Add(profileloop);
FilledRegion filledRegion = FilledRegion.Create(_doc, fillTypeId, viewID, profileloops);
filledRegion.SetLineStyleId(lineStyleId);
return filledRegion;
}
but it throws an exception. Any thoughts?
Solved! Go to Solution.
Link copied