Table of Contents

Class DxfBlockParameterValueSet

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

The values a distance or an angle of a dynamic block's parameter may take, as AutoCAD's Block Editor sets them in its Value Set: from a minimum to a maximum in steps of an increment, or one of a list. A parameter given none takes any value. An angle's set is in radians, within a turn: Increments(0, 2 * Math.PI, Math.PI / 12) lets an angle of 0, 15, 30 ... 360 degrees.

public sealed class DxfBlockParameterValueSet
Inheritance
DxfBlockParameterValueSet
Inherited Members

Remarks

AutoCAD keeps the set in the parameter's flags (96): 1 a minimum, 2 a maximum, 4 an increment, 8 a list. An increment set is written with the flags 7, a list with 8, as AutoCAD 2021 read them (plugin v17): of the set from 50 to 300 by 10, a Width set to 75 became 70, 77 became 80 and 400 became 300; of the list 50, 100 ... 300, 75 and 77 became 100 and 400 became 300. Only a list is given back by GetAllowedValues(), as AutoCAD gives back only a list. A set is given to a linear parameter, to either distance of an XY parameter, to the angle of a rotation parameter, and to the distance and the angle of a polar parameter; an angle's is taken round the circle, as AutoCAD 2021 took it (plugin D25): of the steps of 15 degrees from 0 to 90, 300 degrees became 0 and 200 became 90.

Properties

Increment

Gets the step of a set of increments; nought for a list.

Maximum

Gets the greatest distance of a set of increments; nought for a list.

Minimum

Gets the least distance of a set of increments; nought for a list.

Values

Gets the distances of a list, from the least up; none for a set of increments.

Methods

Increments(double, double, double)

Makes a set of the distances from a minimum to a maximum in steps of an increment, as AutoCAD's Value Set of the type Increment: Increments(50, 300, 10) lets a Width of 50, 60 ... 300, a value between steps going to the nearest step and one beyond an end to that end.

List(IEnumerable<double>)

Makes a set of the distances listed, as AutoCAD's Value Set of the type List: List(new[] { 300.0, 50, 100 }) lets a Width of 50, 100 or 300, a value between them going to the nearest. The list is kept from the least up, a value within the point tolerance of Default of the one before it left out. An angle's list may hold nought: List(new[] { 0.0, Math.PI / 2, Math.PI }) lets an arrow point along x, along y or back.