Object representing various types of SpotDimension
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Syntax
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); }

Private Sub Getinfo_SpotDimension(spotDimension As SpotDimension) Dim message As String = "SpotDimension's Location : " Dim location As Location = spotDimension.Location If TypeOf location Is LocationPoint Then Dim point As LocationPoint = TryCast(location, LocationPoint) message += vbLf + location.[GetType]().Name & " : " message += (("(" + point.Point.X & ", ") + point.Point.Y & ", ") + point.Point.Z & ")" Else Dim locCurve As LocationCurve = TryCast(location, LocationCurve) Dim curve As Curve = locCurve.Curve message += vbLf + location.[GetType]().Name & " : " message += (((vbLf & "Start Point : " & "(") + curve.GetEndPoint(0).X & ", ") + curve.GetEndPoint(0).Y & ", ") + curve.GetEndPoint(0).Z & ")" message += (((vbLf & "End point : " & "(") + curve.GetEndPoint(1).X & ", ") + curve.GetEndPoint(1).Y & ", ") + curve.GetEndPoint(1).Z & ")" End If TaskDialog.Show("Revit", message) End Sub
Inheritance Hierarchy
System..::..Object
Autodesk.Revit.DB..::..Element
Autodesk.Revit.DB..::..Dimension
Autodesk.Revit.DB..::..SpotDimension
Autodesk.Revit.DB..::..Element
Autodesk.Revit.DB..::..Dimension
Autodesk.Revit.DB..::..SpotDimension