Table of Contents

Method Point

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Point(string, Func<GeoPoint2>, Action<GeoPoint2>)

Makes a point the app keeps, as SNAPBASE: asked "Enter new value for SNAPBASE <0.0000,0.0000>:", typed or picked, a number alone the point that far from the last point towards the cursor, as AutoCAD 2021 takes SNAPBASE 5; set at once, no step of undo.

public static CadSystemVariable Point(string name, Func<GeoPoint2> get, Action<GeoPoint2> set)

Parameters

name string

The name.

get Func<GeoPoint2>

Reads the value.

set Action<GeoPoint2>

Sets a point taken.

Returns

CadSystemVariable

The variable.

Exceptions

ArgumentNullException

Thrown when either delegate is null.

ArgumentException

Thrown when the name is empty or has a space.

Point(string, Func<GeoPoint2>, Func<GeoPoint2, bool>)

Makes a point the app keeps that refuses some values, as SNAPUNIT: asked "Enter new value for SNAPUNIT <10.0000,10.0000>:", typed or picked, a number alone the point that far from the last point towards the cursor (GRIDUNIT 5 with the last point at (10, 20) and the cursor at (13, 24) is 13,24, as AutoCAD 2021 takes it), text that is no point refused with "Invalid 2D point." and asked again; a point the take refuses, as 0,5 for a snap spacing, written off with AutoCAD's "Cannot set SNAPUNIT to that value." and not asked again; set at once, no step of undo.

public static CadSystemVariable Point(string name, Func<GeoPoint2> get, Func<GeoPoint2, bool> take)

Parameters

name string

The name.

get Func<GeoPoint2>

Reads the value.

take Func<GeoPoint2, bool>

Sets a point typed or picked, and gives whether it was taken.

Returns

CadSystemVariable

The variable.

Exceptions

ArgumentNullException

Thrown when either delegate is null.

ArgumentException

Thrown when the name is empty or has a space.