Method Leader
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
Leader(CadDocument, string, GeoPoint2, GeoPoint2, string, double?)
Measures a multileader of words as MLEADER would make it, its arrow at one point and its landing at another, in a multileader style of the document: the leader line, its arrowhead, the landing and the words, laid out as the command lays them and measured in the style's text style. An arrow at (0, 0) and a landing at (30, 20) in a style of text 2.5 high and a landing of 0.36 gives a box from (0, 0) to a little past (30.45, 20) by the width of the words.
public static CadMeasurement Leader(CadDocument document, string style, GeoPoint2 arrow, GeoPoint2 landing, string words, double? scale)
Parameters
documentCadDocumentThe drawing, whose style and fonts are used.
stylestringThe name of the multileader style; null for the current one, which a drawing with none is given as Standard, as MLEADER gives it.
arrowGeoPoint2Where the arrowhead points.
landingGeoPoint2Where the leader lands.
wordsstringThe words, not empty.
scaledouble?The scale of the multileader; null for the one MLEADER gives a new one.
Returns
- CadMeasurement
The box and the frames.
Exceptions
- ArgumentNullException
Thrown when the document is null.
- ArgumentException
Thrown when the words are empty, the arrow and the landing are the same point, the scale is not above nought, the document has no such style, or the style is annotative or of no words (a block or none).
Leader(CadDocument, string, GeoPoint2, GeoPoint2, string, double?, Tolerance)
Measures a multileader as Leader(CadDocument, string, GeoPoint2, GeoPoint2, string, double?) does, the landing refused where it is within the tolerance of the arrow: a landing 1E-12 away from the arrow draws no leader line, as one exactly at it does not.
public static CadMeasurement Leader(CadDocument document, string style, GeoPoint2 arrow, GeoPoint2 landing, string words, double? scale, Tolerance tolerance)
Parameters
documentCadDocumentThe drawing, whose style and fonts are used.
stylestringThe name of the multileader style; null for the current one, which a drawing with none is given as Standard, as MLEADER gives it.
arrowGeoPoint2Where the arrowhead points.
landingGeoPoint2Where the leader lands.
wordsstringThe words, not empty.
scaledouble?The scale of the multileader; null for the one MLEADER gives a new one.
toleranceToleranceHow near the landing may be to the arrow, in millimetres, before it is taken for the same point.
Returns
- CadMeasurement
The box and the frames.
Exceptions
- ArgumentNullException
Thrown when the document is null.
- ArgumentException
Thrown when the words are empty, the arrow and the landing are within the tolerance of each other, the scale is not above nought, the document has no such style, or the style is annotative or of no words (a block or none).