Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
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
563 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  

Rail Community


Autodesk Design & Make Report