CadBlockEditor
from OpenCAD2D import CadBlockEditor
class CadBlockEditor(System.Object) ยท CadBlockEditor in the .NET reference
The Block Editor open on a drawing (CadDocument.BlockEditor): the block it shows, the space that shows it and whether it has changes not saved.
Properties and fields
CurrentDrawing
CurrentDrawing: ClassVar[str]
The name the Edit Block Definition dialog lists first, which opens model space itself.
NotAllowed
NotAllowed: ClassVar[str]
What a command that leaves the block says while the editor is open.
BasePoint
@property
def BasePoint(self) -> GeoPoint3
Gets the base point of the block, where the UCS icon stands: the origin of its definition, or the drawing's $INSBASE for <Current Drawing>.
HasUnsavedChanges
@property
def HasUnsavedChanges(self) -> bool
Gets whether the block has changes not saved: an edit since it was opened or last saved, or a new block never saved. Undoing back to where it was opened leaves none.
IsCurrentDrawing
@property
def IsCurrentDrawing(self) -> bool
Gets whether model space itself is open (<Current Drawing>).
IsNew
@property
def IsNew(self) -> bool
Gets whether the block was made by BEDIT and has not been saved yet: closing without saving makes no block.
Name
@property
def Name(self) -> str
Gets the name of the block, or CadBlockEditor.CurrentDrawing where model space is open.
Space
@property
def Space(self) -> CadSpace
Gets the space that shows the block, the document's current space while the editor is open.
VisibilityState
@property
def VisibilityState(self) -> str | None
Gets the visibility state the editor shows, as AutoCAD's Visibility State box: the first of the block's when it opens; null for a block of none. The entities another state lists and this one does not are hidden; an entity no state lists, as one drawn in the editor, is shown in every state.
VisibilityStates
@property
def VisibilityStates(self) -> System.Collections.Generic.IReadOnlyList[str]
Gets the visibility states of the block open, as AutoCAD's Visibility State box lists them, read anew from the block on each call (DxfBlockTableRecord.GetVisibilityStates); empty for a block of none, or for <Current Drawing>.