Table of Contents

CadUcsManager

from OpenCAD2D import CadUcsManager

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

The user coordinate systems of a drawing open in the presenter, as AutoCAD keeps them: the current system of model space and that of paper space, up to ten earlier ones of each for UCS Previous, the named systems of the drawing's UCS table, and how the UCS icon is shown.

Properties and fields

Current

.NET

@property
def Current(self) -> CadUcs

Gets the current system of the space the canvas shows.

FollowToPlan

.NET

@property
def FollowToPlan(self) -> bool
@FollowToPlan.setter
def FollowToPlan(self, value: bool) -> None

Gets or sets whether the view goes to the plan of the system when it changes (UCSFOLLOW, "Update view to Plan when UCS is changed" of the UCS dialog); off until set, as AutoCAD's. The view of the presenter is not turned, so the setting is kept and changes nothing else.

IconAtOrigin

.NET

@property
def IconAtOrigin(self) -> bool
@IconAtOrigin.setter
def IconAtOrigin(self, value: bool) -> None

Gets or sets whether the UCS icon is drawn at the origin of the system where the origin is in view (UCSICON ORigin), else at the lower left corner (Noorigin); at the origin until set.

IconOn

.NET

@property
def IconOn(self) -> bool
@IconOn.setter
def IconOn(self, value: bool) -> None

Gets or sets whether the UCS icon is shown (UCSICON ON and OFF); on until set, as AutoCAD's.

IconSelectable

.NET

@property
def IconSelectable(self) -> bool
@IconSelectable.setter
def IconSelectable(self, value: bool) -> None

Gets or sets whether the UCS icon can be selected (UCSSELECTMODE, "Allow Selecting UCS icon" of the UCS dialog); on until set, as AutoCAD's. The presenter draws the icon and does not select it, so the setting is kept and changes nothing else.

IsModified

.NET

@property
def IsModified(self) -> bool

Gets whether the systems differ from those the drawing was opened or last saved with: a change taken back by U is none.

Model

.NET

@property
def Model(self) -> CadUcs

Gets the current system of model space.

Named

.NET

@property
def Named(self) -> System.Collections.Generic.IReadOnlyList[CadUcs]

Gets the named systems, in ordinal order of their names, letters of either case the same.

Paper

.NET

@property
def Paper(self) -> CadUcs

Gets the current system of paper space, which every layout shares.

SaveWithViewport

.NET

@property
def SaveWithViewport(self) -> bool
@SaveWithViewport.setter
def SaveWithViewport(self, value: bool) -> None

Gets or sets whether each viewport keeps its own UCS (UCSVP, "Save UCS with viewport" of the UCS dialog); on until set, as AutoCAD's. A space has one view here, so the setting is kept and changes nothing else.

Working

.NET

@property
def Working(self) -> CadUcs

Gets the system points are given in for the space the canvas shows: the current one, or the world where the current one is not parallel to the view (CadUcs.IsPlanar), as a system turned out of the plan read from a file.

Events

Changed

.NET

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

Raised when a current system, a named one or the icon changes.

Methods

CurrentOf

.NET

def CurrentOf(self, space: CadSpace) -> CadUcs

Gets the current system of a space: CadUcsManager.Model for model space, CadUcsManager.Paper for a layout.

Delete

.NET

def Delete(self, name: str) -> bool

Deletes a named system, as UCS Delete; a current system of that name is left with none, as AutoCAD's *NO NAME*.

Find

.NET

def Find(self, name: str) -> CadUcs

Gets the named system of a name, letters of either case the same; null for none.

Previous

.NET

def Previous(self) -> bool

Makes the system current before the last change current again in the space the canvas shows, as UCS Previous.

Rename

.NET

def Rename(self, name: str, newName: str) -> bool

Renames a named system, as the UCS dialog does; a current system of that name takes the new one.

Restore

.NET

def Restore(self, name: str) -> bool

Makes a named system current in the space the canvas shows, as UCS Restore.

Save

.NET

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

Saves the current system of the space the canvas shows under a name, replacing a named system of that name, and names the current system so, as UCS Save; the system as it was, unnamed, is kept for CadUcsManager.Previous first, as AutoCAD does.

SetCurrent

.NET

def SetCurrent(self, ucs: CadUcs) -> None

Makes a system current in the space the canvas shows, the one it replaces kept for CadUcsManager.Previous, ten at most. As in AutoCAD the current system is kept every time, a system of the same origin and axes as the current one, to the tolerance of Tolerance.Default, included: UCS World in the World UCS adds one more World for UCS Previous to give back.

WorkingOf

.NET

def WorkingOf(self, space: CadSpace) -> CadUcs

Gets the system points are given in for a space, as CadUcsManager.Working says.