CadConstraintBars
from OpenCAD2D import CadConstraintBars
class CadConstraintBars(System.Object) ยท CadConstraintBars in the .NET reference
The constraint bars of a document, as AutoCAD 2021 shows them: for each constrained object a bar of small icons, the bars of the objects selected and those of the objects a constraint was just made on shown (CONSTRAINTBARDISPLAY), any object's bar hidden or shown for good by CONSTRAINTBAR. What is hidden is kept with the document for the session, not in the file, as AutoCAD keeps it.
Events
Changed
@property
def Changed(self) -> System.EventHandler[System.EventArgs]
@Changed.setter
def Changed(self, value: System.EventHandler[System.EventArgs]) -> None
Raised when what the bars show changes without the drawing changing: a bar shown or hidden, a constraint just made.
Methods
BarsFor
def BarsFor(
self,
space: CadSpace,
selected: System.Collections.Generic.IReadOnlyCollection[str],
settings: CadConstraintSettings,
) -> System.Collections.Generic.IReadOnlyList[CadConstraintBar]
The bars of a space to draw now: those of every object whose bar is shown for good, of the objects selected where the settings show the bars of the selection, and of the objects a constraint was just made on where they show those; an object hidden has none. The icons are those of the types the settings show.
Delete
def Delete(self, space: CadSpace, index: int) -> CadEditResult
Takes one constraint away, as an icon of a bar is deleted; one undo step.
EndCommand
def EndCommand(self) -> None
Forgets the objects constraints were just made on: the bars of those not selected go.
HideAll
def HideAll(self, space: CadSpace) -> None
Hides the bars of every constrained object of a space for good (the ribbon's Hide All).
HideBars
def HideBars(self, handles: System.Collections.Generic.IEnumerable[str]) -> None
Hides the bars of objects, selected or not, as CONSTRAINTBAR's Hide.
IsHidden
def IsHidden(self, handle: str) -> bool
Whether the bar of an object is hidden for good.
ResetBars
def ResetBars(self, handles: System.Collections.Generic.IEnumerable[str]) -> None
Puts the bars of objects back as they were before they were shown or hidden, as CONSTRAINTBAR's Reset.
ShowAll
def ShowAll(self, space: CadSpace) -> None
Shows the bars of every constrained object of a space for good (the ribbon's Show All).
ShowBars
def ShowBars(self, handles: System.Collections.Generic.IEnumerable[str]) -> None
Shows the bars of objects, selected or not, as CONSTRAINTBAR's Show.