Table of Contents

Method SetToolSetting

Namespace
OpenCAD2D.Remote
Assembly
OpenCAD2D.Remote.dll

SetToolSetting(string, object)

Sets a setting the tool declares in its plugin.json. The app checks the value as it checks one typed in the settings window, keeps it in its settings file and shows it there; the next GetToolSetting(string) gives it. Only on the channel of the tools, with the token of the tool.

public void SetToolSetting(string name, object value)

Parameters

name string

The setting's name, as plugin.json gives it.

value object

A number, a bool, a text or the name of a choice; null for a text with no value. A text that reads as the setting's kind is taken ("2.5" for a number).

Exceptions

ArgumentNullException

Thrown when the name is null.

ArgumentException

Thrown when the value is none of those types, or a number that is not finite.

CadRemoteException

Thrown when the tool declares no such setting, the value is out of its range or of another kind (the message is the setting's own words: "The setting Text height lies from 0.1 to 1000."), or this is not the channel of the tools.