Table of Contents

Method Distance

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Distance(string, Func<double>, Action<double>)

Makes a distance the app keeps, of either sign, as POLARDIST: asked "Enter new value for POLARDIST <0.0000>:", shown to four places, typed or given by two points, 0,0 then 3,4 at "Specify second point:" setting 5 as AutoCAD 2021 does; text that is no number refused with AutoCAD's "Requires numeric distance or two points." and asked again; set at once, no step of undo.

public static CadSystemVariable Distance(string name, Func<double> get, Action<double> set)

Parameters

name string

The name.

get Func<double>

Reads the value.

set Action<double>

Sets a value taken.

Returns

CadSystemVariable

The variable.

Exceptions

ArgumentNullException

Thrown when either delegate is null.

ArgumentException

Thrown when the name is empty or has a space.