Table of Contents

Method Measures

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Measures(CadStyleSample, IDictionary<string, object>, string)

Measures what a field of the dimension style dialogs sets on the sample, as a callout: DIMEXE from the dimension line to the end of the first extension line, DIMEXO from the origin to the start of it, DIMFXL along it to the line, DIMASZ along the second arrowhead from its tip, DIMDLE the run of the line past the second extension line (for ticks), DIMDLI between the two dimension lines of the Lines sample, DIMTXT the height of the words, DIMGAP the gap between the dimension line and the words, DIMCEN# the half of the centre mark and DIMJOGANG the angle of the jog (an arc). A part the style leaves out (DIMSE1, DIMSE2, DIMSD1, DIMSD2 on, DIMCEN none) is given with the Key of its field as the ghost of where it would be. The points are in the drawing coordinates of the sample, so the lengths are the values times the overall scale; the label has the value as the field shows it.

public static IReadOnlyList<CadStyleMeasure> Measures(CadStyleSample sample, IDictionary<string, object> values, string key)

Parameters

sample CadStyleSample

The sample, as Sample(DxfDatabase, IDictionary<string, object>, CadDimSampleKind) made it.

values IDictionary<string, object>

The style's variables by name.

key string

The key of the field, as PartsOf(string) takes it.

Returns

IReadOnlyList<CadStyleMeasure>

The measures; none where the field sets no distance, or the sample has not the dimension it is measured on.

Exceptions

ArgumentNullException

Thrown when the sample or the values are null.