Table of Contents

CadRemoteDocument

from OpenCAD2D.Remote import CadRemoteDocument

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

The multileader styles and table styles of a drawing.

One drawing of a running OpenCAD2D. It always means its own drawing, whichever tab the user has shown meanwhile; if the user closes the drawing, the next call throws a CadRemoteException and never reaches another drawing in its place.

What the command line of a drawing has written, for a program that debugs the app.

The edits of a drawing as calls: move, copy, rotate, scale, mirror and offset objects as the app's own commands do. What is queued (CadRemoteDocument.Insert, CadRemoteDocument.Modify, CadRemoteDocument.Delete, the layers) and the edit are one commit, so that the app applies them as one undo step, REMOTE, or as part of the step of the run where the drawing is worked in from a tool's run; a refusal anywhere applies nothing, queued changes included, and empties the queue.

The drawing as JSON and as a graph, for programs that read drawings to learn from them.

The calls the MCP server makes beyond the public API: an edit of the core in one call, and a pick by handle.

Measuring before placing: what an object would take, the empty places of a frame, and whether a candidate fits.

Asking the user to pick on the canvas, as Tekla's Picker does.

The Properties palette, the entities in an area of the drawing, and the words of LIST, as the app has them.

The table records of a drawing, added in a commit, and the styles and linetypes an inserted object names.

The sheets of a drawing of the app: its layouts made and set up, and viewports put on them.

A drawing of the app kept as it stands and put back to it, for programs that run episodes of edits in the app.

Where things are drawn: the box each entity takes and the overlaps of words, as the app draws the drawing.

A drawing checked against a drawing standard, in the app.

The layouts, linetypes and block summaries of a drawing, asked without copying its database or objects.

The layers and the layouts of a drawing.

The view, the named views, the system variables and the selection by area of a drawing.

Properties and fields

Blocks

.NET

@property
def Blocks(self) -> System.Collections.Generic.IReadOnlyList[DxfBlockTableRecord]

Gets the blocks of the drawing with their objects, sorted by name without regard to case, then by ordinal order, as the Block manager lists them: the blocks of the layouts (*Model_Space, *Paper_Space) and those AutoCAD names itself (*D1, *U1) are left out. An external reference attached and loaded brings the blocks of its drawing as AutoCAD lists them, grid|TAG for the block TAG of grid, each with DxfSymbolTableRecord.IsDependent true and its objects the drawing's own. They are copies, asked of the app each time: changing one changes nothing in the app.

CurrentDimensionStyle

.NET

@property
def CurrentDimensionStyle(self) -> str
@CurrentDimensionStyle.setter
def CurrentDimensionStyle(self, value: str) -> None

Gets or sets the name of the dimension style new dimensions are drawn in, as the style box and Set Current do: the setting takes effect at once, as one undo step of the app (DIMSTYLE), not at CadRemoteDocument.CommitChanges.

CurrentLayer

.NET

@property
def CurrentLayer(self) -> str
@CurrentLayer.setter
def CurrentLayer(self, value: str) -> None

Gets or sets the name of the layer new objects are drawn on, which an object inserted with no layer of its own is put on.

CurrentLayout

.NET

@property
def CurrentLayout(self) -> str
@CurrentLayout.setter
def CurrentLayout(self, value: str) -> None

Gets or sets the tab the drawing shows, Model or the name of a layout, as clicking the tab does: switching is an undo step of the app (LAYOUT), and the objects of the layout shown are what the user sees and picks. The drawing is shown in the app first.

CurrentView

.NET

@property
def CurrentView(self) -> CadRemoteExtents

Gets the part of the space shown that the canvas of the app shows, asked each time: the whole canvas, so wider or taller than a box given to CadRemoteDocument.SetCurrentView where the shape differs.

DimensionStyles

.NET

@property
def DimensionStyles(self) -> System.Collections.Generic.IReadOnlyList[DxfDimStyleTableRecord]

Gets the dimension styles of the drawing, sorted by name without regard to case, then by ordinal order. They are copies, asked of the app each time, with the text style, linetypes and arrowhead blocks they point at: changing one changes nothing in the app.

Extents

.NET

@property
def Extents(self) -> CadRemoteExtents

Gets the extents the header of the drawing holds (EXTMIN and EXTMAX), asked of the app each time. A drawing with nothing drawn has the empty box a header starts with, whose least corner is above its greatest (CadRemoteExtents.IsEmpty).

HasWindow

.NET

@property
def HasWindow(self) -> bool

Gets whether the app shows the drawing in a window: false where the drawing's session has no view of the canvas, as in a test of the app with no window, where the view calls work on a view of 942 by 534 pixels showing 10 units of height about the origin. Asked each time.

Id

.NET

@property
def Id(self) -> int

Gets the id of the drawing, which holds as long as the app runs and is never given to another drawing.

IsActive

.NET

@property
def IsActive(self) -> bool

Gets whether the drawing is the one the user works in; as the app last said (CadRemoteDocuments asks again each time it is walked).

IsModified

.NET

@property
def IsModified(self) -> bool

Gets whether the drawing has changes not saved; as the app last said.

Layers

.NET

@property
def Layers(self) -> System.Collections.Generic.IReadOnlyList[CadRemoteLayer]

Gets the layers of the drawing as the Layer manager lists them, in the order of its table. They are copies, asked of the app each time: change one and give it to CadRemoteDocument.ModifyLayer.

Layouts

.NET

@property
def Layouts(self) -> System.Collections.Generic.IReadOnlyList[str]

Gets the names of the tabs of the drawing in the order they are shown: Model, then each layout. Asked of the app each time.

Linetypes

.NET

@property
def Linetypes(self) -> System.Collections.Generic.IReadOnlyList[str]

Gets the names of the linetypes of the drawing, in the order of its table, asked of the app each time: ByBlock, ByLayer and Continuous in a new drawing.

Name

.NET

@property
def Name(self) -> str

Gets the name of the drawing with its extension, as A-101.dwg, or Drawing1.dwg for one with no file yet; as the app last said.

NamedViews

.NET

@property
def NamedViews(self) -> System.Collections.Generic.IReadOnlyList[str]

Gets the names of the named views of the drawing, as -VIEW ? lists them: in ordinal order, letters of either case alike. Asked each time.

Path

.NET

@property
def Path(self) -> str

Gets the full path of the drawing's file; empty for a drawing with no file yet; as the app last said.

TextStyles

.NET

@property
def TextStyles(self) -> System.Collections.Generic.IReadOnlyList[DxfTextStyleTableRecord]

Gets the text styles of the drawing, sorted by name without regard to case, then by ordinal order. They are copies, asked of the app each time: changing one changes nothing in the app.

Methods

Activate

.NET

def Activate(self) -> None

Shows the drawing in the app, as clicking its tab does.

AddLayer

.NET

def AddLayer(self, layer: CadRemoteLayer) -> None

Queues a new layer, to be made when CadRemoteDocument.CommitChanges is called. The layers of a commit are made before its objects, so that an object inserted in the same commit can be on the layer. The layer is copied now, so changing it afterwards changes nothing.

AddLayout

.NET

def AddLayout(self, name: str, paper: str, landscape: bool) -> str

Asks the app to add a layout on a sheet, as LAYOUT New and the page setup do, one undo step; it does not become the tab shown.

AddRecords

.NET

def AddRecords(self, records: DxfDatabase) -> None

Queues the table records and the blocks of a drawing of yours to be added to the drawing when CadRemoteDocument.CommitChanges is called: its text styles, linetypes, blocks (each with its objects) and dimension styles that the small drawing of the commit has none of the name of, as DxfDatabase.Insert merges them. They are written before the layers and the objects of the commit, so that a layer can have the linetype, and an object the style or block, that the same commit adds. A record of a name the app's drawing has already is the app's own, as a merge keeps it, and the one given is left out. The records are copied now, so changing them afterwards changes nothing.

AddViewport

.NET

def AddViewport(
    self,
    layout: str,
    frame: System.Collections.Generic.IReadOnlyList[float],
    scale: str,
    center: System.Collections.Generic.IReadOnlyList[float],
    frozenLayers: System.Collections.Generic.IEnumerable[str],
) -> str

Asks the app to add a viewport to a layout that shows model space at a scale, as MVIEW with two corners does, one undo step.

CheckStandard

.NET

def CheckStandard(self, standard: str, modelScale: float, tolerance: float) -> CadRemoteStandardResult

Checks the drawing against a drawing standard and scores it, as the app does: a score for each rule the standard runs, a total and the violations with their places. The standard is the text of a file of the schema docs/schemas/opencad2d-standard-v1.schema.json.

Close

.NET

def Close(self, discard: bool = ...) -> None

Closes the drawing in the app, as the x of its row does, but with no question and no dialog: the app never asks the user about a drawing closed from here. A drawing with changes not saved is refused unless discard is set, which throws the changes away. The app shows the next drawing, or its start screen where this was the last; the drawing is no longer in CadApplication.Documents, and every later call on it throws.

CommitChanges

.NET

def CommitChanges(self) -> System.Collections.Generic.IReadOnlyList[str]

Sends the queued inserts, modifies, deletes and layers and has the app apply them as one undo step, the canvas drawn again. Nothing queued is no request.

Copy

.NET

def Copy(
    self,
    objects: System.Collections.Generic.IEnumerable[Any],
    displacement: GeoVector2,
) -> System.Collections.Generic.IReadOnlyList[Any]

Copies objects by a displacement, as COPY does: two lines copied by (0, 50) add two lines 50 above them in the app. Sends the queued changes with it.

Delete

.NET

def Delete(self, entity: DxfEntity) -> None

Queues the erasing of an object read from this drawing.

def Delete(self, handle: str) -> None

Queues the erasing of an object.

DeleteView

.NET

def DeleteView(self, name: str) -> None

Erases a named view, as -VIEW Delete does.

ExportGraph

.NET

def ExportGraph(self, layout: str, tolerance: float) -> str

Gets the graph of the drawing as one JSON document, as the app writes it (schema opencad2d.graph, version 1): a node for each entity of CadRemoteDocument.ExportJson and the edges that touch, contain, dimension and annotate.

def ExportGraph(self, layout: str, tolerance: float, maxEdges: int) -> str

Gets the graph of the drawing as CadRemoteDocument.ExportGraph does, cut at a number of edges: the first maxEdges edges of the whole graph in its order (kind, source, target), with truncated true and edgesFound in the text where there were more.

ExportJson

.NET

def ExportJson(self, layout: str) -> str

Gets the drawing as one JSON document in millimetres, block references walked down to what they draw, as the app writes it (schema opencad2d.drawing, version 1; see docs/schemas): the entities in the order of their handles, with their layer, colour, linetype, box, words and geometry, and the tables of layers, styles, linetypes and blocks.

Fits

.NET

def Fits(
    self,
    layout: str,
    x: float,
    y: float,
    width: float,
    height: float,
    rotation: float,
    kinds: System.Collections.Generic.IEnumerable[str],
    margin: float,
    tolerance: float,
) -> bool

Asks the app whether a candidate place is free: nothing of the kinds asked about runs through it or comes within the margin of it.

GetBlocks

.NET

def GetBlocks(self) -> System.Collections.Generic.IReadOnlyList[CadRemoteBlock]

Gets the blocks of the drawing that an INSERT can place (layout blocks, anonymous blocks and external references left out), sorted by name without regard to case, then by ordinal order, with the entity count of each. Unlike CadRemoteDocument.Blocks, the entities of the definitions are not copied.

GetBounds

.NET

def GetBounds(self, layout: str) -> CadRemoteBounds

Gets the box every entity of a space takes as the app draws it: the letters of an SHX or TrueType word and not its insertion point, the picture of a dimension, a block however deep and scaled, the columns of an MTEXT. An entity that draws nothing has no row. A line from (0, 0) to (100, 40) has the box from (0, 0) to (100, 40).

GetBoundsOf

.NET

def GetBoundsOf(self, handles: System.Collections.Generic.IEnumerable[str]) -> CadRemoteBounds

Gets the boxes of the entities of some handles as the app draws them, in the order given, each in the space that holds it. A handle the drawing has no entity of, or one that draws nothing, has no row.

GetDatabase

.NET

def GetDatabase(self) -> DxfDatabase

Gets a copy of the whole drawing as the app has it now, changes not saved included: the header, tables, blocks, layouts with their viewports and every object, read from the DXF text the app writes of its database. The file of the drawing is not touched. A program that draws or checks the drawing in its own process opens it with CadDocument.From(database). The copy is a snapshot: later changes in the app are not in it.

GetFreeSpace

.NET

def GetFreeSpace(
    self,
    layout: str,
    minX: float,
    minY: float,
    maxX: float,
    maxY: float,
    kinds: System.Collections.Generic.IEnumerable[str],
    margin: float,
    minWidth: float,
    minHeight: float,
    tolerance: float,
) -> CadRemoteFreeSpace

Asks the app for the empty rectangles of a frame: the largest rectangles, not turned, that no line or word of the kinds asked about runs through or comes within the margin of, and that cannot be made larger, the largest first.

GetHandlesIn

.NET

def GetHandlesIn(
    self,
    layout: str,
    how: str,
    points: System.Collections.Generic.IEnumerable[GeoPoint2],
    tolerance: float,
) -> System.Collections.Generic.IReadOnlyList[str]

Asks the app for the handles of the entities of a space that lie in an area, whole: unlike CadRemoteDocument.SelectWindow it is not held to the view of the window, so a drawing gives the same handles with a window or without. A box from (0, 0) to (100, 50) in window takes a line from (10, 10) to (20, 10) and leaves a circle of radius 30 about (50, 25), which crossing takes. The selection of the drawing is not changed.

GetHistory

.NET

def GetHistory(self, count: int = ...) -> CadRemoteHistory

Gets the last lines of the drawing's command line, the oldest first: each command, each prompt with its answer, each message, as the user sees them in the history. Nothing is typed or changed.

GetLayoutSetups

.NET

def GetLayoutSetups(self) -> str

Asks the app how every layout is set up, model space first: its sheet, what is plotted, its scale and plot style. The answer is JSON text, an array with an object for each layout: name, model, paper, width and height (millimetres), landscape, units, area, scale (as 1:50, null where fitted), plotStyle and viewports.

GetLayouts

.NET

def GetLayouts(self) -> System.Collections.Generic.IReadOnlyList[CadRemoteLayout]

Gets the spaces of the drawing in tab order (Model first, then each layout), with each sheet's paper size and units, rotation, entity count and viewports. The drawing itself is not copied.

GetLinetypes

.NET

def GetLinetypes(self) -> System.Collections.Generic.IReadOnlyList[CadRemoteLinetype]

Gets the linetypes of the drawing, sorted by name without regard to case, then by ordinal order, with their descriptions, pattern lengths and dashes. The drawing itself is not copied.

GetMultileaderStyles

.NET

def GetMultileaderStyles(self) -> System.Collections.Generic.IReadOnlyList[CadRemoteMultileaderStyle]

Gets the multileader styles of the drawing, sorted by name without regard to case, then by ordinal order. They are copies, asked of the app each time, and the drawing itself is not copied: a drawing of 10000 objects costs no more than one of none.

GetObject

.NET

def GetObject(self, handle: str) -> DxfEntity

Reads an object by its handle.

GetObjects

.NET

def GetObjects(self, filter: CadObjectFilter | None = ...) -> System.Collections.Generic.IReadOnlyList[DxfEntity]

Reads the objects that match a filter, in the order of the drawing: model space first, then each layout, each in the order its objects were made.

GetOverlaps

.NET

def GetOverlaps(
    self,
    layout: str,
    words: System.Collections.Generic.IEnumerable[str],
    over: System.Collections.Generic.IEnumerable[str],
    handles: System.Collections.Generic.IEnumerable[str],
    tolerance: float,
) -> CadRemoteOverlaps

Finds the entities whose words overlap what is drawn near them, as the app's spatial query does: a word is the frame of a text (a TEXT, an MTEXT's runs, a dimension's words) turned as the text is, and it overlaps a line, an arc, a polyline or a hatch that runs through it, a filled area it lies in, and the frame of another word it shares an area with; what only touches it within the tolerance does not, nor a part of its own entity. A kind is the DXF name of an entity, TEXT, MTEXT, DIMENSION, MULTILEADER, LINE, INSERT.

GetProperties

.NET

def GetProperties(self, handles: System.Collections.Generic.IEnumerable[str]) -> CadRemoteProperties

Asks the app what its Properties palette shows for some entities, as it would with them selected: for one line from (0, 0) to (300, 400) the label Line (1) and, in the group Geometry, Length500.0000. Several entities of one kind show the rows they share, a value that differs as *Varies*. The selection of the drawing is not changed.

GetSelectedObjects

.NET

def GetSelectedObjects(self) -> System.Collections.Generic.IReadOnlyList[DxfEntity]

Reads the objects the user has selected in the drawing, in the order of their handles.

GetTableStyles

.NET

def GetTableStyles(self) -> System.Collections.Generic.IReadOnlyList[CadRemoteTableStyle]

Gets the table styles of the drawing, sorted by name without regard to case, then by ordinal order. They are copies, asked of the app each time, and the drawing itself is not copied.

GetVariable

.NET

def GetVariable(self, name: str) -> Any

Gets the value of a system variable of the drawing as AutoLISP's getvar gives it: an Int32 for a whole number or a switch, a Double for a real (an angle in radians), a String for a text and a double[] of three coordinates for a point, two for a variable AutoCAD keeps as a 2D point.

HandleOf

.NET

def HandleOf(self, entity: DxfEntity) -> str

Gets the handle an object read from this drawing has in the app's drawing.

HandleOfTicket

.NET

def HandleOfTicket(self, ticket: str) -> str

Gets the handle in the app's drawing of the object a ticket stands for, from what the commit that made it answered: no request is sent, where CadRemoteDocument.GetObject of the ticket and CadRemoteDocument.HandleOf ask the app once. After an edit call (CadRemoteDocument.Move, CadRemoteDocument.Copy, CadRemoteDocument.Offset...) it has the handles of the objects inserted in the same commit.

Insert

.NET

def Insert(self, entity: DxfEntity, layout: str | None = ...) -> str

Queues an object to be added to the drawing. The entity is copied now, so changing it afterwards changes nothing; it can be one made in code (new DxfLine(...)), or one read from this or another drawing of the same app, which is copied with the layers, styles and blocks it needs. A layer the drawing has not is made. An INSERT of a block the drawing has not brings the block's definition when the INSERT was made from a block of your own that holds objects (new DxfBlockReference(point, record) with record in a DxfDatabase of yours); a block the drawing has already is the drawing's own, whatever yours holds. An INSERT of a block that is neither in the drawing nor defined with objects is refused at the commit. A dimension made in code is drawn by the app, with the drawing's current dimension style unless it names one. A text or MTEXT (or an attribute of an INSERT) that names a text style, or any object that names a linetype, is one the drawing has (the app's own record is kept) or CadRemoteDocument.AddRecords adds in the same commit; one nobody has is refused at once, as the library refuses an object that names a style its drawing has not.

ListObjects

.NET

def ListObjects(
    self,
    handles: System.Collections.Generic.IEnumerable[str],
) -> System.Collections.Generic.IReadOnlyList[str]

Asks the app for the lines AutoCAD's LIST writes for some entities: the kind and layer, the space, the handle and the shape of each (the length and angle of a line, the centre and radius of a circle). The app runs LIST in a command session of its own, so its command line, its selection and its undo list are as they were.

Measure

.NET

def Measure(self, entity: DxfEntity) -> CadRemoteMeasurement

Asks the app what an object would take on the page once added, without adding it: the box of everything it draws and the frame of each word, drawn by the app's own code in the app's own text styles, fonts and dimension styles. A dimension is drawn in the style it names. A text or MTEXT that names a text style names one the drawing has.

MeasureLeader

.NET

def MeasureLeader(
    self,
    style: str,
    arrowX: float,
    arrowY: float,
    landingX: float,
    landingY: float,
    words: str,
    scale: float | None,
) -> CadRemoteMeasurement

Asks the app what a multileader of words would take once MLEADER made it, its arrow at one point and its landing at another, in a multileader style of the drawing.

Mirror

.NET

def Mirror(
    self,
    objects: System.Collections.Generic.IEnumerable[Any],
    first: GeoPoint2,
    second: GeoPoint2,
    eraseSource: bool = ...,
) -> System.Collections.Generic.IReadOnlyList[Any]

Mirrors objects across the line through two points, as MIRROR does: a text stays readable under MIRRTEXT 0, a dimension too. Sends the queued changes with it.

Modify

.NET

def Modify(self, entity: DxfEntity) -> None

Queues the changes made to an object read from this drawing, to be written over the object it was read from when CadRemoteDocument.CommitChanges is called, which keeps its handle. A dimension is drawn again by the app.

ModifyLayer

.NET

def ModifyLayer(self, layer: CadRemoteLayer) -> None

Queues the look of a layer to be written over the look the layer of that name has, when CadRemoteDocument.CommitChanges is called: the layer read from CadRemoteDocument.Layers and changed since. Everything but the name is written; a property left as the drawing has it changes nothing. The app refuses a layer of an external reference and the freezing of the current layer.

Move

.NET

def Move(
    self,
    objects: System.Collections.Generic.IEnumerable[Any],
    displacement: GeoVector2,
) -> System.Collections.Generic.IReadOnlyList[Any]

Moves objects by a displacement, as MOVE does: a line from (0, 0) to (100, 0) moved by (10, 5) runs from (10, 5) to (110, 5) in the app. Sends the queued changes with it.

Offset

.NET

def Offset(
    self,
    curve: DxfCurve,
    distance: float,
    side: GeoPoint2,
) -> System.Collections.Generic.IReadOnlyList[DxfCurve]

Offsets a curve to the side of a point, as one pick of OFFSET with a distance typed: a line from (0, 0) to (100, 0) offset by 5 toward (50, 10) adds a line from (0, 5) to (100, 5) on the layer of the curve, which is kept. Sends the queued changes with it.

Pan

.NET

def Pan(self, displacement: GeoVector2) -> None

Pans the view so that the drawing moves by the displacement, as -PAN does.

PickObject

.NET

def PickObject(self, prompt: str, timeout: System.TimeSpan | None = ...) -> DxfEntity

Asks the user for one object and waits for the answer: one click ends it. If exactly one object was selected before the call, it is taken at once.

PickObjects

.NET

def PickObjects(
    self,
    prompt: str,
    timeout: System.TimeSpan | None = ...,
) -> System.Collections.Generic.IReadOnlyList[DxfEntity]

Asks the user for objects and waits for the answer, as a command asks "Select objects:": the user clicks them or drags a window and presses Enter. Objects the user had selected before the call are taken at once, as the app's commands take them. The objects are copies as CadRemoteDocument.GetObjects gives them, so CadRemoteDocument.HandleOf and CadRemoteDocument.Modify work on them.

PickPoint

.NET

def PickPoint(
    self,
    prompt: str,
    basePoint: GeoPoint3 | None = ...,
    timeout: System.TimeSpan | None = ...,
) -> GeoPoint3

Asks the user for a point and waits for the answer. The drawing is shown, the prompt appears on the app's command line, and the user clicks on the canvas (with the snaps and the object snaps the drawing has on) or types the point. The app stays free for the user while the call waits. The point is in world coordinates, its Z nought.

Regen

.NET

def Regen(self) -> None

Regenerates the drawing, as REGEN does.

Release

.NET

def Release(self, snapshot: CadRemoteSnapshot) -> None

Tells the app to forget a snapshot and the memory it holds; one already released is no error.

Reset

.NET

def Reset(self, snapshot: CadRemoteSnapshot) -> None

Asks the app to put the drawing back as the snapshot kept it: its entities, tables, layouts, handles and header variables. The steps made since are forgotten, not made one more step, so that a thousand resets leave the app's memory where one does; the display is updated as after an undo.

RestoreView

.NET

def RestoreView(self, name: str) -> None

Shows a named view, as -VIEW Restore does.

Rotate

.NET

def Rotate(
    self,
    objects: System.Collections.Generic.IEnumerable[Any],
    basePoint: GeoPoint2,
    angle: float,
) -> System.Collections.Generic.IReadOnlyList[Any]

Turns objects about a base point, as ROTATE does: counter-clockwise, in radians, the angle taken from nought up to a whole turn as ROTATE takes it. Sends the queued changes with it.

Save

.NET

def Save(self) -> None

Saves the drawing to its file.

SaveAs

.NET

def SaveAs(self, path: str, version: str | None = ...) -> None

Saves the drawing to a file, which it is known by from then on.

SaveView

.NET

def SaveView(self, name: str) -> None

Saves the view on screen under a name, as -VIEW Save does; a name that is a view's already redefines it. One undo step of the app, VIEW.

Scale

.NET

def Scale(
    self,
    objects: System.Collections.Generic.IEnumerable[Any],
    basePoint: GeoPoint2,
    factor: float,
) -> System.Collections.Generic.IReadOnlyList[Any]

Scales objects about a base point, as SCALE does: a circle of radius 10 scaled by 2 is one of radius 20. Sends the queued changes with it.

Select

.NET

def Select(self, handles: System.Collections.Generic.IEnumerable[str]) -> None

Selects objects in the drawing, as the user does, in place of what was selected.

SelectAll

.NET

def SelectAll(self) -> System.Collections.Generic.IReadOnlyList[DxfEntity]

Takes every object of the space the drawing works in, as the All option of "Select objects:" does, the first viewport of a layout left out. The objects the user has selected stay selected: CadRemoteDocument.Select changes them.

SelectCrossingWindow

.NET

def SelectCrossingWindow(
    self,
    first: GeoPoint2,
    second: GeoPoint2,
) -> System.Collections.Generic.IReadOnlyList[DxfEntity]

Takes the objects a window lies across or contains, as the Crossing option of "Select objects:" does, held to the view as CadRemoteDocument.SelectWindow is. The objects the user has selected stay selected.

SelectWindow

.NET

def SelectWindow(self, first: GeoPoint2, second: GeoPoint2) -> System.Collections.Generic.IReadOnlyList[DxfEntity]

Takes the objects that lie wholly inside a window, as the Window option of "Select objects:" does: where the app has a window, only objects its view shows. The objects the user has selected stay selected.

SendCommand

.NET

def SendCommand(self, text: str) -> CadRemoteCommandResult

Types text on the drawing's command line, as the user would, and waits for the command to end. The drawing is shown first, since a command works on the drawing the user sees. Lines parted by a line feed are typed one after the other, and words in a line as if parted by Space, so "ZOOM E " zooms to the extents and "LINE 0,0 100,0" starts a line and gives two points. Waits up to 30 seconds.

def SendCommand(self, text: str, timeout: System.TimeSpan) -> CadRemoteCommandResult

Types text on the drawing's command line as CadRemoteDocument.SendCommand does, and waits up to a time for the command to end. A command that asks the user for a point stays running after the time: the result says so, and the command goes on in the app.

SetCurrentView

.NET

def SetCurrentView(self, first: GeoPoint2, second: GeoPoint2) -> None

Sets the view to show a box, fitted with no margin as ZOOM Window fits one.

SetPageSetup

.NET

def SetPageSetup(self, layout: str, paper: str, orientation: str, area: str, scale: str, plotStyle: str) -> str

Asks the app to change the page setup of a layout, one undo step; only what is given is changed.

SetVariable

.NET

def SetVariable(self, name: str, value: object) -> None

Sets a system variable of the drawing as AutoLISP's setvar does; one the drawing keeps is an undo step of the app, SETVAR.

TakeSnapshot

.NET

def TakeSnapshot(self) -> CadRemoteSnapshot

Asks the app to keep the drawing as it stands, with the changes not saved, to put it back to with CadRemoteDocument.Reset: for a program that tries edits on the drawing again and again from the same start. What the user did before can still be undone after a reset while the app's undo list holds the point of the snapshot; where it does not (a reset to a later snapshot after a reset to an earlier one) the app reads the drawing back from the snapshot's bytes and starts its undo list afresh. What came after the snapshot is the episode.

ToString

.NET

def ToString(self) -> str

ZoomCenter

.NET

def ZoomCenter(self, center: GeoPoint2, height: float) -> None

Zooms to a height about a centre, as ZOOM Center does.

ZoomExtents

.NET

def ZoomExtents(self) -> None

Zooms the drawing to its extents, as ZOOM Extents does: what the space shown draws, fitted with a margin of 5 %. One undo step of the app, ZOOM. The view calls work on the drawing the app shows, which is not this one until CadRemoteDocument.Activate is called.

ZoomObjects

.NET

def ZoomObjects(self, handles: System.Collections.Generic.IEnumerable[str]) -> None

Zooms to objects, as ZOOM Object does: the box of the ones drawn in the space shown, fitted with a margin of 5 %; none drawn there leaves the view as it was.

ZoomPrevious

.NET

def ZoomPrevious(self) -> bool

Goes back to the view before the last zoom or pan, as ZOOM Previous does.

ZoomScaled

.NET

def ZoomScaled(self, factor: float) -> None

Scales the view as it is about its centre, as ZOOM nX does: 2 shows half the width.

ZoomWindow

.NET

def ZoomWindow(self, first: GeoPoint2, second: GeoPoint2) -> None

Zooms the drawing to a window, as ZOOM Window does: the window fitted with no margin. With the console view of the app with no window (942 by 534 pixels), (0, 0) to (10, 10) shows (-3.820, 0) to (13.820, 10).