Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

create circle filled region

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
ameer.mansourWAK8Y
511 Views, 2 Replies

create circle filled region

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?

Labels (1)
2 REPLIES 2
Message 2 of 3

Split boundary into two arcs with start and end angle parameters.

1) 0 to pi

2) pi to 2 * pi

Message 3 of 3

Nice Trick!
it worked
thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community