private void InternalSetReferencePoints(ReferencePointArray pts) { var cbp = ((Autodesk.Revit.DB.CurveByPoints)InternalCurveElement) as Autodesk.Revit.DB.CurveByPoints; var crvPnts = cbp.GetPoints(); if (!CurveUtils.PointArraysAreSame(crvPnts, pts)) { TransactionManager.Instance.EnsureInTransaction(Document); ((Autodesk.Revit.DB.CurveByPoints)InternalCurveElement).SetPoints(pts); TransactionManager.Instance.TransactionTaskDone(); } }