Table of Contents

CadRemoteToolRun

from OpenCAD2D import CadRemoteToolRun

class CadRemoteToolRun(System.Object) ยท CadRemoteToolRun in the .NET reference

A run of a tool's command, the command the user typed in a drawing and a program outside the app works for (see CadRemoteServer.CreateRunCommand). It lives from the command's start to its end, whichever way the command ends; its members are read and called on the thread of the drawings.

Properties and fields

Document

.NET

@property
def Document(self) -> CadDocument

Gets the drawing the command was typed in, which the run works in.

DocumentId

.NET

@property
def DocumentId(self) -> int

Gets the number the tools channel gives that drawing, which a tool names in its requests of the drawing.

Error

.NET

@property
def Error(self) -> str | None

Gets the line of the error the tool ended the run with, or the one that kept it from beginning; null for any other end.

Id

.NET

@property
def Id(self) -> int

Gets the number of the run, which the tool names in every request of it; from 1, the next one for each run of the server.

IsEnded

.NET

@property
def IsEnded(self) -> bool

Gets whether the run has ended.

Name

.NET

@property
def Name(self) -> str

Gets the name of the command, in capitals.

Outcome

.NET

@property
def Outcome(self) -> CadRemoteToolRunOutcome | None

Gets how the run ended; null while it runs.

Events

Ended

.NET

@property
def Ended(self) -> System.EventHandler[System.EventArgs]
@Ended.setter
def Ended(self, value: System.EventHandler[System.EventArgs]) -> None

Raised when the run has ended, its changes kept or taken back, on the thread of the drawings, as the command line ends the command: a handler may write a line, but starts no command.

Methods

Cancel

.NET

def Cancel(self) -> None

Ends the run as Esc does, from the app's side: the tool process is gone or hangs. Its changes are taken back, the question open, if any, is answered as cancelled, and every later request of the run is refused. Does nothing once the run has ended.