RVTDocs.com
Namespace: Autodesk.Revit.DB

SpotDimension

Class
Description:
Object representing various types of SpotDimension
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.Element
    Autodesk.Revit.DB.Dimension
      Autodesk.Revit.DB.SpotDimension
Syntax
public class SpotDimension : Dimension
Examples
private void Getinfo_SpotDimension(SpotDimension spotDimension)
{
    string message = "SpotDimension's Location : ";
    Location location = spotDimension.Location;

    if (location is LocationPoint)
    {
        LocationPoint point = location as LocationPoint;

        message += "\n" + location.GetType().Name + " : ";
        message += "(" + point.Point.X + ", " + point.Point.Y + ", " + point.Point.Z + ")";
    }
    else
    {
        LocationCurve locCurve = location as LocationCurve;
        Curve curve = locCurve.Curve;
        message += "\n" + location.GetType().Name + " : ";
        message += "\nStart Point : " + "(" + curve.GetEndPoint(0).X + ", "
                    + curve.GetEndPoint(0).Y + ", " + curve.GetEndPoint(0).Z + ")";
        message += "\nEnd point : " + "(" + curve.GetEndPoint(1).X + ", "
                    + curve.GetEndPoint(1).Y + ", " + curve.GetEndPoint(1).Z + ")";
    }

    TaskDialog.Show("Revit",message);
}