Esempio n. 1
0
 /// <summary>
 /// This node will remove the given curve segments from the curtain grid line.
 /// </summary>
 /// <param name="curtainGridLine">The curtain gridline to remove segments from.</param>
 /// <param name="curves">The curves that represent the grid segment to remove.</param>
 /// <returns name="curtainGridLine">The curtain grid that was supplied.</returns>
 /// <search>
 /// CurtainGridLine.RemoveSegment, rhythm
 /// </search>
 public static global::Revit.Elements.Element RemoveSegment(global::Revit.Elements.Element curtainGridLine, List <Curve> curves)
 {
     Autodesk.Revit.DB.Document        doc = DocumentManager.Instance.CurrentDBDocument;
     Autodesk.Revit.DB.CurtainGridLine internalCurtainGridline = (Autodesk.Revit.DB.CurtainGridLine)curtainGridLine.InternalElement;
     foreach (var curve in curves)
     {
         TransactionManager.Instance.EnsureInTransaction(doc);
         internalCurtainGridline.RemoveSegment(curve.ToRevitType());
         TransactionManager.Instance.TransactionTaskDone();
     }
     return(curtainGridLine);
 }