Table of Contents

Namespace OpenCAD2D.Remote

Classes

CadApplication

A running OpenCAD2D, driven from another program the way a Tekla Open API program drives a running Tekla Structures: new CadApplication() connects, Documents lists the drawings it has open and each CadRemoteDocument reads and edits one of them.

CadObjectFilter

What GetObjects(CadObjectFilter) asks for: the objects of one kind, on one layer, in one space. A member left null does not narrow the answer, so an empty filter is every object of the drawing's model space and layouts.

CadRemoteAnswer

What the user answered to Ask(CadAskKind, string, GeoPoint3?, IReadOnlyList<string>, string).

CadRemoteBlock

A block summary of a drawing of a running OpenCAD2D, as GetBlocks() lists it without copying the block's objects: its name and how many entities it holds.

CadRemoteBounds

The boxes of the entities of a drawing as the app draws them (GetBounds(string)): a handle and four numbers a row, kept as two arrays so that a drawing of 100 000 entities is two arrays and no 100 000 objects. A row is the box of one entity in the order the space is drawn; an entity that draws nothing has none.

CadRemoteCommandResult

What SendCommand(string) got back: whether the command ended, and what the command line wrote.

CadRemoteDocument

The multileader styles and table styles of a drawing.

CadRemoteDocuments

The drawings a running app has open, in the order of their ids (a drawing the app has not listed before gets the next id; drawings listed together get theirs by name, so two runs agree). The list is asked of the app each time it is walked, so that a drawing the user opened a moment ago is in it.

CadRemoteError

One fault of the app: an exception its crash log holds, or a request it could not answer.

CadRemoteErrors

What GetErrors(int) reads: the app's crash log and the requests it could not answer.

CadRemoteException

What the remote channel throws when the app cannot be reached or refuses a request: no OpenCAD2D is running, the connection was lost, a drawing was closed meanwhile, the owner of an object refused an edit, a block is not in the drawing. The message says why, in the words the app's own command line would.

CadRemoteExtents

A box of the drawing: the extents the header of a drawing holds, as Extents reads them, or the part of the space shown that the view shows, as CurrentView reads it: the least and the greatest corner, in the units of the drawing. A drawing with nothing drawn has the empty box a header starts with, whose least corner is above its greatest, which IsEmpty says.

CadRemoteFreeSpace

The empty rectangles of a frame as the app finds them (GetFreeSpace(string, double, double, double, double, IEnumerable<string>, double, double, double, double)): four numbers a rectangle, the largest first, kept as one array.

CadRemoteHistory

The last lines of a drawing's command line, as GetHistory(int) reads them.

CadRemoteLayer

A layer of a drawing of a running OpenCAD2D, as the Layer manager lists it: its name and how it looks. One read from Layers is a copy; change it and give it to ModifyLayer(CadRemoteLayer) to write the changes, or make a new one and give it to AddLayer(CadRemoteLayer).

CadRemoteLayout

A layout (or model space) of a drawing of a running OpenCAD2D, as GetLayouts() lists it: its tab order, whether it is shown, its sheet settings, how many entities it holds and its viewports.

CadRemoteLinetype

A linetype of a drawing of a running OpenCAD2D, as GetLinetypes() lists it: its name, description, pattern length and dash lengths in millimetres.

CadRemoteMeasurement

What an object would take on the page, found by the app before it is added (Measure(DxfEntity)): the box of everything it draws and the frame of each of its words, kept as two arrays.

CadRemoteMultileaderStyle

A multileader style of a drawing of a running OpenCAD2D, as GetMultileaderStyles() lists it: the settings of the Multileader Style Manager, in millimetres as drawn. It is a copy; changing the drawing's style does not change it.

CadRemoteOverlaps

The pairs of entities whose words overlap (GetOverlaps(string, IEnumerable<string>, IEnumerable<string>, IEnumerable<string>, double)): the handle of the entity whose words they are, the handle of what they meet and the box of the common part, kept as three arrays. A pair is one row however many of the parts of the two meet.

CadRemoteProperties

What the Properties palette of the app shows for some entities (GetProperties(IEnumerable<string>)): a label such as Line (1) and the rows in groups (General, Geometry, Text, Misc, Attributes), each value written as the palette writes it.

CadRemotePropertyGroup

A group of rows of the Properties palette, such as Geometry.

CadRemotePropertyRow

A row of the Properties palette: a label and the value as the palette writes it.

CadRemoteRuleScore

How one rule of a standard fared in the app's check (CheckStandard(string, double, double)).

CadRemoteRun

A run of a tool's command, as the tool sees it: the command the user typed in the app, which the app holds open (its command line says "<name> is working... (Esc to stop)") while the tool works. Everything the tool does on the connection that joined the run (JoinRun(int)) is part of the command: its questions are asked on the command line, its commits are one undo step, and Esc ends it with every change taken back.

CadRemoteScreenshot

The picture of the app's drawing canvas, as GetScreenshot(int) reads it.

CadRemoteSnapshot

A drawing of the app as it stood when TakeSnapshot() kept it, to be put back with Reset(CadRemoteSnapshot). The app holds the drawing (compressed, about 0.2 MB for 10 000 entities) until Release(CadRemoteSnapshot) or until the drawing is closed.

CadRemoteStandardResult

What the app found in a drawing checked against a standard (CheckStandard(string, double, double)): the scores, the total and the violations, as the app's own check gives them.

CadRemoteTableCellStyle

The cell style of one kind of row (title, header or data) of a CadRemoteTableStyle.

CadRemoteTableStyle

A table style of a drawing of a running OpenCAD2D, as GetTableStyles() lists it, in millimetres as drawn. It is a copy; changing the drawing's style does not change it.

CadRemoteViewport

A viewport of a paper layout of a running OpenCAD2D, as Viewports lists it: where it stands on the sheet, the part of model space it shows, its scale and the layers frozen in it alone.

CadRemoteViolation

One place a drawing breaks a rule of a standard, as the app found it.

CadRunningApp

One OpenCAD2D that is running, as GetRunning() lists it: which process, what its window says, when the user last worked in it and which drawings it has open.

Enums

CadAnswerKind

What kind of answer the user gave to a question of a run.

CadAskKind

What a tool asks the user inside a run: the kinds of prompt Ask(CadAskKind, string, GeoPoint3?, IReadOnlyList<string>, string) takes.