CadConstraintSettings
from OpenCAD2D import CadConstraintSettings
class CadConstraintSettings(System.Object) ยท CadConstraintSettings in the .NET reference
The settings of AutoCAD 2021's Constraint Settings dialog and of the variables behind them (CONSTRAINTBARMODE, CONSTRAINTBARDISPLAY, CONSTRAINTINFER, CONSTRAINTNAMEFORMAT, CCONSTRAINTFORM, DYNCONSTRAINTMODE, CONSTRAINTSOLVEMODE, PARAMETERCOPYMODE), and the tolerances and the order AUTOCONSTRAIN works by. They stay with the session.
Constructors
__init__
def __init__(self) -> None
Properties and fields
AutoAngle
@property
def AutoAngle(self) -> float
@AutoAngle.setter
def AutoAngle(self, value: float) -> None
The angle within which AUTOCONSTRAIN takes two directions for one, in degrees.
AutoDistance
@property
def AutoDistance(self) -> float
@AutoDistance.setter
def AutoDistance(self, value: float) -> None
The distance within which AUTOCONSTRAIN takes two points for one, in drawing units.
AutoRules
@property
def AutoRules(self) -> System.Collections.Generic.List[CadAutoConstrainRule]
@AutoRules.setter
def AutoRules(self, value: System.Collections.Generic.List[CadAutoConstrainRule] | None) -> None
The types AUTOCONSTRAIN tries and the order it tries them in.
BarDisplay
@property
def BarDisplay(self) -> int
@BarDisplay.setter
def BarDisplay(self, value: int) -> None
CONSTRAINTBARDISPLAY: 0 shows no constraint bar, 1 shows the bars of the objects that are selected, 2 those of the objects a constraint was just applied to, 3 both. AutoCAD 2021 starts at 3.
BarMode
@property
def BarMode(self) -> int
@BarMode.setter
def BarMode(self, value: int) -> None
The constraint types a bar shows, as the bits of CONSTRAINTBARMODE (4095 for all twelve).
CopyMode
@property
def CopyMode(self) -> int
@CopyMode.setter
def CopyMode(self, value: int) -> None
PARAMETERCOPYMODE: what a copy of constrained objects keeps; kept as AutoCAD keeps it.
DynamicMode
@property
def DynamicMode(self) -> int
@DynamicMode.setter
def DynamicMode(self, value: int) -> None
DYNCONSTRAINTMODE: whether dynamic dimensional constraints are shown (1) or hidden (0).
Form
@property
def Form(self) -> int
@Form.setter
def Form(self, value: int) -> None
CCONSTRAINTFORM: the form a new dimensional constraint is made in: 0 dynamic, 1 annotational.
Infer
@property
def Infer(self) -> bool
@Infer.setter
def Infer(self, value: bool) -> None
CONSTRAINTINFER: whether a coincident, horizontal or vertical constraint is inferred where a line or arc is drawn.
NameFormat
@property
def NameFormat(self) -> int
@NameFormat.setter
def NameFormat(self, value: int) -> None
CONSTRAINTNAMEFORMAT: the words a dimensional constraint shows: 0 its name, 1 its value, 2 its name and expression.
PerpendicularAtIntersection
@property
def PerpendicularAtIntersection(self) -> bool
@PerpendicularAtIntersection.setter
def PerpendicularAtIntersection(self, value: bool) -> None
Whether a perpendicular is applied only where the objects meet (the AutoConstrain tab's box).
SolveMode
@property
def SolveMode(self) -> int
@SolveMode.setter
def SolveMode(self, value: int) -> None
CONSTRAINTSOLVEMODE: how an edit is solved; kept as AutoCAD keeps it, the presenter always solves.
TangentAtIntersection
@property
def TangentAtIntersection(self) -> bool
@TangentAtIntersection.setter
def TangentAtIntersection(self, value: bool) -> None
Whether a tangent is applied only where the objects touch at an end of one of them (the AutoConstrain tab's box).
Transparency
@property
def Transparency(self) -> int
@Transparency.setter
def Transparency(self, value: int) -> None
The bar transparency of the Geometric tab, in percent.
Methods
Clone
def Clone(self) -> CadConstraintSettings
A copy the Constraint Settings dialog changes.
ShowsBarOf
def ShowsBarOf(self, type: CadConstraintType) -> bool
Whether a bar shows the constraints of a kind.