Table of Contents

CadRemoteViewport

from OpenCAD2D.Remote import CadRemoteViewport

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

A viewport of a paper layout of a running OpenCAD2D, as CadRemoteLayout.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.

Constructors

__init__

def __init__(self) -> None

Properties and fields

CenterX

.NET

@property
def CenterX(self) -> float

Gets the x coordinate of the viewport's centre on the sheet, in paper units.

CenterY

.NET

@property
def CenterY(self) -> float

Gets the y coordinate of the viewport's centre on the sheet, in paper units.

CustomScale

.NET

@property
def CustomScale(self) -> float

Gets the paper length of one model unit, such as 0.1 for 1:10.

FrozenLayers

.NET

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

Gets the names of the layers frozen in this viewport only, sorted by name ignoring case.

Handle

.NET

@property
def Handle(self) -> str

Gets the handle of the viewport in the drawing.

Height

.NET

@property
def Height(self) -> float

Gets the height of the viewport on the sheet, in paper units.

IsLocked

.NET

@property
def IsLocked(self) -> bool

Gets whether the viewport's display is locked against zooming and panning.

IsOn

.NET

@property
def IsOn(self) -> bool

Gets whether the viewport shows model space.

Number

.NET

@property
def Number(self) -> int

Gets the viewport's number; the viewport of the sheet itself (number 1) is left out of the list.

Scale

.NET

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

Gets the scale written as 1:10 or 2:1, or null where the viewport has no named ratio.

ViewCenterX

.NET

@property
def ViewCenterX(self) -> float

Gets the x coordinate of the centre of the model-space view.

ViewCenterY

.NET

@property
def ViewCenterY(self) -> float

Gets the y coordinate of the centre of the model-space view.

ViewHeight

.NET

@property
def ViewHeight(self) -> float

Gets the height of the model-space view.

Width

.NET

@property
def Width(self) -> float

Gets the width of the viewport on the sheet, in paper units.