/// <summary> /// Construct this type from an existing Revit element. /// </summary> /// <param name="dividedPath"></param> /// <param name="isRevitOwned"></param> /// <returns></returns> internal static DividedPath FromExisting(Autodesk.Revit.DB.DividedPath dividedPath, bool isRevitOwned) { return(new DividedPath(dividedPath) { IsRevitOwned = isRevitOwned }); }
private static void SetSpacing(Autodesk.Revit.DB.DividedPath divPath, double xi, SpacingRuleLayout xs) { divPath.SpacingRuleLayout = xs; switch (divPath.SpacingRuleLayout) { case SpacingRuleLayout.FixedDistance: divPath.Distance = xi; break; case SpacingRuleLayout.FixedNumber: divPath.FixedNumberOfPoints = (int)xi; break; case SpacingRuleLayout.MaximumSpacing: divPath.MaximumDistance = xi; break; case SpacingRuleLayout.MinimumSpacing: divPath.MinimumDistance = xi; break; } }
public static DividedPath Wrap(Autodesk.Revit.DB.DividedPath ele, bool isRevitOwned) { return(DividedPath.FromExisting(ele, isRevitOwned)); }
/// <summary> /// Set the internal object and update the id's /// </summary> /// <param name="divPath">The divided path</param> private void InternalSetDividedPath(Autodesk.Revit.DB.DividedPath divPath) { InternalDividedPath = divPath; InternalElementId = divPath.Id; InternalUniqueId = divPath.UniqueId; }
/// <summary> /// Construct a DSDividedPath from an existing one. /// </summary> /// <param name="divPath"></param> private DividedPath(Autodesk.Revit.DB.DividedPath divPath) { InternalSetDividedPath(divPath); }
/// <summary> /// Construct a DSDividedPath from an existing one. /// </summary> /// <param name="divPath"></param> private DividedPath(Autodesk.Revit.DB.DividedPath divPath) { SafeInit(() => InitDividedPath(divPath)); }