CadScaleListRow
from OpenCAD2D import CadScaleListRow
class CadScaleListRow(System.Object) ยท CadScaleListRow in the .NET reference
A scale of AutoCAD's Edit Drawing Scales: its name, its paper and drawing units, and whether the drawing keeps it (the unit scale, the current annotation scale, one an object points at) or an object points at it, which greys Delete and, for the latter, the units of Edit Scale.
Constructors
__init__
def __init__(self, name: str, paperUnits: float, drawingUnits: float) -> None
Makes a scale of the list, as Add Scale makes one: 1:25 of one paper unit to 25 drawing units.
Properties and fields
DrawingUnits
@property
def DrawingUnits(self) -> float
Gets the drawing units, as 50.
IsInUse
@property
def IsInUse(self) -> bool
Gets whether an object of the drawing points at the scale, a viewport or an annotative object: AutoCAD's Edit Scale does not change its units then ("You cannot change the scale properties of a scale that is referenced by an object in the drawing").
IsKept
@property
def IsKept(self) -> bool
Gets whether the drawing keeps the scale, as AutoCAD keeps one: the unit scale, the current annotation scale (CANNOSCALE) and one an object points at. Delete is greyed for it, and Reset keeps it.
Name
@property
def Name(self) -> str
Gets the name, as 1:50.
Original
@property
def Original(self) -> str | None
Gets the name the scale has in the drawing; null for one added in the dialog.
PaperUnits
@property
def PaperUnits(self) -> float
Gets the paper units, as 1.
Scale
@property
def Scale(self) -> float
Gets the scale they give: the paper units over the drawing units, 0.02 for 1:50.
Methods
Number
@staticmethod
def Number(value: float) -> str
A number as the dialog writes units: up to eight decimals, no zeros after them, 0.0078125 for 1/128.
Sentence
def Sentence(self) -> str
The line Selected scale shows: "1 paper unit = 50 drawing units".
ToString
def ToString(self) -> str
With
def With(self, name: str, paperUnits: float, drawingUnits: float) -> CadScaleListRow
The scale with another name and units, the drawing's scale it stands for kept.