Table of Contents

Constructor CadRibbonButton

Namespace
OpenCAD2D.Plugins
Assembly
OpenCAD2D.Core.dll

CadRibbonButton(string, string)

Makes a button that starts a command: a command running is cancelled first, as AutoCAD's ^C^C is.

public CadRibbonButton(string text, string command)

Parameters

text string

The text of the button.

command string

The command's name: "NUMCIRCLES", "_NUMCIRCLES" and ".NUMCIRCLES" start the same command.

Exceptions

ArgumentNullException

Thrown when the text or the command is null.

ArgumentException

Thrown when the command is empty.

CadRibbonButton(string, Action<CadPluginContext>)

Makes a button that runs a callback at once, on the window's thread.

public CadRibbonButton(string text, Action<CadPluginContext> run)

Parameters

text string

The text of the button.

run Action<CadPluginContext>

The callback. One that throws is logged as a Warn and its message written on the command line with the plugin's name.

Exceptions

ArgumentNullException

Thrown when the text or the callback is null.