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
@property
def CenterX(self) -> float
Gets the x coordinate of the viewport's centre on the sheet, in paper units.
CenterY
@property
def CenterY(self) -> float
Gets the y coordinate of the viewport's centre on the sheet, in paper units.
CustomScale
@property
def CustomScale(self) -> float
Gets the paper length of one model unit, such as 0.1 for 1:10.
FrozenLayers
@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
@property
def Handle(self) -> str
Gets the handle of the viewport in the drawing.
Height
@property
def Height(self) -> float
Gets the height of the viewport on the sheet, in paper units.
IsLocked
@property
def IsLocked(self) -> bool
Gets whether the viewport's display is locked against zooming and panning.
IsOn
@property
def IsOn(self) -> bool
Gets whether the viewport shows model space.
Number
@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
@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
@property
def ViewCenterX(self) -> float
Gets the x coordinate of the centre of the model-space view.
ViewCenterY
@property
def ViewCenterY(self) -> float
Gets the y coordinate of the centre of the model-space view.
ViewHeight
@property
def ViewHeight(self) -> float
Gets the height of the model-space view.
Width
@property
def Width(self) -> float
Gets the width of the viewport on the sheet, in paper units.