Table of Contents

Class CadPluginSettingEntry

Namespace
OpenCAD2D.Plugins
Assembly
OpenCAD2D.Core.dll

One setting a Python tool declares in the "settings" of its plugin.json, as a C# plugin declares one with CadSettingAttribute: { "name": "textHeight", "label": "Text height", "kind": "number", "default": 2.5, "minimum": 0.1, "maximum": 1000, "description": "How high the numbers are written." }. The kinds are number, integer, boolean, text and choice (with "choices": ["Left", "Right"]); the name is an identifier, [A-Za-z_][A-Za-z0-9_]*, once in the file; the label is the name where not given; the default is needed and must be of the kind, in range and, for a choice, one of the choices.

public sealed class CadPluginSettingEntry
Inheritance
CadPluginSettingEntry
Inherited Members

Properties

Choices

Gets the names a choice offers, in the order written; empty for any other kind.

Default

Gets the default: a double, an int, a bool, a string or, for a choice, the name of the choice as Choices spell it.

Description

Gets what the setting does; null for nothing.

Kind

Gets the kind of value it holds.

Label

Gets the label the presenter shows: "Text height"; the name where none is declared.

Maximum

Gets the greatest value of a number or an integer, inclusive; infinity for none and for any other kind.

Minimum

Gets the least value of a number or an integer, inclusive; minus infinity for none and for any other kind.

Name

Gets the name the tool reads and writes the setting by: "textHeight".