Revit 2023 API |
Document..::..NewSpotCoordinate Method |
Document Class See Also |
Generate a new spot coordinate object within the project.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Syntax
C# |
---|
public SpotDimension NewSpotCoordinate( View view, Reference reference, XYZ origin, XYZ bend, XYZ end, XYZ refPt, bool hasLeader ) |
Visual Basic |
---|
Public Function NewSpotCoordinate ( _ view As View, _ reference As Reference, _ origin As XYZ, _ bend As XYZ, _ end As XYZ, _ refPt As XYZ, _ hasLeader As Boolean _ ) As SpotDimension |
Visual C++ |
---|
public: SpotDimension^ NewSpotCoordinate( View^ view, Reference^ reference, XYZ^ origin, XYZ^ bend, XYZ^ end, XYZ^ refPt, bool hasLeader ) |
Parameters
- view
- Type: Autodesk.Revit.DB..::..View
The view in which the spot coordinate is to be visible.
- reference
- Type: Autodesk.Revit.DB..::..Reference
The reference to which the spot coordinate is to be bound.
- origin
- Type: Autodesk.Revit.DB..::..XYZ
The point which the spot coordinate evaluate.
- bend
- Type: Autodesk.Revit.DB..::..XYZ
The bend point for the spot coordinate.
- end
- Type: Autodesk.Revit.DB..::..XYZ
The end point for the spot coordinate.
- refPt
- Type: Autodesk.Revit.DB..::..XYZ
The actual point on the reference which the spot coordinate evaluate.
- hasLeader
- Type: System..::..Boolean
Indicate if it has leader or not.
Return Value
If successful a new spot dimension object, otherwise nullNothingnullptra null reference (Nothing in Visual Basic).
Remarks
If the origin point is not on the reference, it'll be projected to the reference automatically. And the refPt
is projected point. If the reference is not valid or the point cannot be projected to
reference correctly, an exception will be thrown
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | Thrown if the view does not exist in the given document. |