Table of Contents

Method SetVariable

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

SetVariable(string, object)

Sets a system variable as AutoLISP's setvar does, through the variable's own rules: a whole number may be given as a real that is whole, a real as a whole number, an angle in radians. A variable the drawing keeps is one undo step named SETVAR (none where the value is the one it has); one the app keeps is set at once.

public void SetVariable(string name, object value)

Parameters

name string

The name, letters of either case alike.

value object

An int, a double, a string, or a double[] of two or three coordinates.

Exceptions

ArgumentNullException

Thrown when the name or the value is null.

ArgumentException

Thrown when the presenter has no variable of that name, it is read only, or it refuses the value.