Example #1
0
 /// <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
     });
 }
Example #2
0
        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;
            }
        }
Example #3
0
 public static DividedPath Wrap(Autodesk.Revit.DB.DividedPath ele, bool isRevitOwned)
 {
     return(DividedPath.FromExisting(ele, isRevitOwned));
 }
Example #4
0
 /// <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;
 }
Example #5
0
 /// <summary>
 /// Construct a DSDividedPath from an existing one.
 /// </summary>
 /// <param name="divPath"></param>
 private DividedPath(Autodesk.Revit.DB.DividedPath divPath)
 {
     InternalSetDividedPath(divPath);
 }
Example #6
0
 /// <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;
 }
Example #7
0
 /// <summary>
 /// Construct a DSDividedPath from an existing one.
 /// </summary>
 /// <param name="divPath"></param>
 private DividedPath(Autodesk.Revit.DB.DividedPath divPath)
 {
     SafeInit(() => InitDividedPath(divPath));
 }