CadSettingAttribute
from OpenCAD2D.Plugins import CadSettingAttribute
class CadSettingAttribute(System.Attribute) ยท CadSettingAttribute in the .NET reference
Marks a public property of a plugin's class as a setting the presenter shows and the user changes, as [CadSetting("Text height", Minimum = 0.1)] public double TextHeight { get; set; } = 2.5;. The property is read for its default once the plugin is loaded, and its value is set through CadPluginSetting.Value; its type is double, int, bool, string or an enumeration, and the presenter draws a box for it of its own (D17 of the plan), so a plugin never touches the window.
Constructors
__init__
def __init__(self, label: str) -> None
Marks a property as a setting with the label the presenter shows.
Properties and fields
Description
@property
def Description(self) -> str | None
@Description.setter
def Description(self, value: str | None) -> None
Gets or sets what the setting does, as the presenter shows it under the label; null for nothing.
Label
@property
def Label(self) -> str
Gets the label the presenter shows.
Maximum
@property
def Maximum(self) -> float
@Maximum.setter
def Maximum(self, value: float) -> None
Gets or sets the greatest value of a number, inclusive; infinity, for none, until set.
Minimum
@property
def Minimum(self) -> float
@Minimum.setter
def Minimum(self, value: float) -> None
Gets or sets the least value of a number, inclusive; minus infinity, for none, until set.