Example #1
0
 /// <summary>
 /// Create a Reference Point from a user selected Element.
 /// </summary>
 /// <param name="pt"></param>
 /// <param name="isRevitOwned"></param>
 /// <returns></returns>
 internal static ReferencePoint FromExisting(Autodesk.Revit.DB.ReferencePoint pt, bool isRevitOwned)
 {
     return(new ReferencePoint(pt)
     {
         IsRevitOwned = isRevitOwned
     });
 }
 public bool CanConvertToSpeckle(object @object)
 {
     return(@object
            switch
     {
         DB.DetailCurve _ => true,
         DB.DirectShape _ => true,
         DB.FamilyInstance _ => true,
         DB.Floor _ => true,
         DB.Level _ => true,
         DB.View _ => true,
         DB.ModelCurve _ => true,
         DB.Opening _ => true,
         DB.RoofBase _ => true,
         DB.Area _ => true,
         DB.Architecture.Room _ => true,
         DB.Architecture.TopographySurface _ => true,
         DB.Wall _ => true,
         DB.Mechanical.Duct _ => true,
         DB.Mechanical.Space _ => true,
         DB.Plumbing.Pipe _ => true,
         DB.Electrical.Wire _ => true,
         DB.CurtainGridLine _ => true, //these should be handled by curtain walls
         DB.Architecture.BuildingPad _ => true,
         DB.Architecture.Stairs _ => true,
         DB.Architecture.StairsRun _ => true,
         DB.Architecture.StairsLanding _ => true,
         DB.Architecture.Railing _ => true,
         DB.Architecture.TopRail _ => true,
         DB.Ceiling _ => true,
         DB.PointCloudInstance _ => true,
         DB.Group _ => true,
         DB.ProjectInfo _ => true,
         DB.ElementType _ => true,
         DB.Grid _ => true,
         DB.ReferencePoint _ => true,
         DB.Structure.AnalyticalModelStick _ => true,
         DB.Structure.AnalyticalModelSurface _ => true,
         DB.Structure.BoundaryConditions _ => true,
         _ => (@object as Element).IsElementSupported()
     });
Example #3
0
 /// <summary>
 /// Convert a ReferencePoint to an XYZ.
 /// </summary>
 /// <param name="refPt"></param>
 /// <returns></returns>
 public static Autodesk.Revit.DB.XYZ ToXyz(this Autodesk.Revit.DB.ReferencePoint refPt)
 {
     return(refPt.Position);
 }
Example #4
0
 public static ReferencePoint Wrap(Autodesk.Revit.DB.ReferencePoint ele, bool isRevitOwned)
 {
     return(ReferencePoint.FromExisting(ele, isRevitOwned));
 }
Example #5
0
 /// <summary>
 /// Initialize a ReferencePoint element
 /// </summary>
 /// <param name="refPt"></param>
 private void InitReferencePoint(Autodesk.Revit.DB.ReferencePoint refPt)
 {
     InternalSetReferencePoint(refPt);
 }
Example #6
0
 /// <summary>
 /// Internal constructor for wrapping a ReferencePoint.
 /// </summary>
 /// <param name="refPt"></param>
 private ReferencePoint(Autodesk.Revit.DB.ReferencePoint refPt)
 {
     SafeInit(() => InitReferencePoint(refPt));
 }
Example #7
0
 private void InternalSetReferencePoint(Autodesk.Revit.DB.ReferencePoint p)
 {
     InternalReferencePoint = p;
     InternalElementId      = InternalReferencePoint.Id;
     InternalUniqueId       = InternalReferencePoint.UniqueId;
 }
Example #8
0
 private void InternalSetReferencePoint(Autodesk.Revit.DB.ReferencePoint p)
 {
     InternalReferencePoint = p;
     this.InternalElementId = InternalReferencePoint.Id;
     this.InternalUniqueId = InternalReferencePoint.UniqueId;
 }