create rebar by freeform
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi everyone, i Have a error, when i created rebars, the rebars are placed somewhere away outside of it. please help me
this is my code.
public IList<CurveLoop> Curveloopform(Document doc, PlanarFace faces)
{
IList<CurveLoop> listloop = new List<CurveLoop>();
listloop = faces.GetEdgesAsCurveLoops();
return listloop;
}
public Element Facehost(Document doc)
{
UIDocument uidoc = _data.uidoc;
Selection sel = uidoc.Selection;
Reference rf = sel.PickObject(ObjectType.Element, "Select Face");
Element ele = doc.GetElement(rf);
return ele;
}
public Rebar CreaRebar(Document doc,IList<CurveLoop> curveloops,Element host,RebarBarType barType)
{
Transaction tran = new Transaction(doc, "sss");
tran.Start();
Rebar rebar= Rebar.CreateFreeForm(doc, barType, host, curveloops,out RebarFreeFormValidationResult error);
tran.Commit();
return rebar;
}