public void Stairs()
{
UIDocument uidoc = this.ActiveUIDocument;
Document doc = uidoc.Document;
Selection sel = uidoc.Selection;
ICollection<ElementId> collection=sel.GetElementIds();
CurveArrArray curArrar = new CurveArrArray();
CurveArray curArr = new CurveArray();
ReferenceArray reArr = new ReferenceArray();
foreach (ElementId id in collection)
{
Stairs stairs = doc.GetElement(id) as Stairs;
ICollection<ElementId> stL = stairs.GetStairsLandings();
foreach (ElementId el in stL) {
StairsLanding landing = stairs.Document.GetElement(el) as StairsLanding;
CurveLoop getPath = landing.GetStairsPath();
Plane getplane = getPath.GetPlane();
using (Transaction tr = new Transaction(doc))
{
tr.Start("test");
Arc ark1 = Arc.Create(getplane, 10,0, Math.PI);
Arc ark2 = Arc.Create(getplane, 10,Math.PI, Math.PI*2);
curArr.Append(ark1);
curArr.Append(ark2);
SweepProfile prof = this.Application.Create.NewCurveLoopsProfile(curArr);
Sweep sweep = doc.FamilyCreate.NewSweep(true,prof, 0, ProfilePlaneLocation.Start);
tr.Commit();
}
}
}
}