CurveElement getSelectedCurveElement(Rebar bar, RebarUpdateCurvesData data) { RebarFreeFormAccessor barAccess = bar.GetFreeFormAccessor(); ElementId id = new ElementId(bar.LookupParameter(AddSharedParams.m_CurveIdName).AsInteger()); return(data.GetDocument().GetElement(id) as CurveElement); }
/// <summary> /// function used to extract current rebar /// </summary> /// <param name="data"> data used to pass or get information regarding constraints cover</param> /// <returns>Current rebar element being regenerated</returns> Rebar getCurrentRebar(RebarUpdateCurvesData data) { ElementId rebarId = data.GetRebarId(); return(data.GetDocument().GetElement(rebarId) as Rebar); }