CadSheetComponent
from OpenCAD2D.SheetSets import CadSheetComponent
class CadSheetComponent(System.Object) ยท CadSheetComponent in the .NET reference
A part of a sheet set that is a sheet or a subset (or the set itself, which is a subset of everything): it has an CadSheetComponent.Id, a place in the set, a description and a list of custom properties. The objects are read from, and written to, the XML tree of their CadSheetSetFile; they can be changed only inside CadSheetSetFile.Change.
Properties and fields
CustomProperties
@property
def CustomProperties(self) -> System.Collections.Generic.IReadOnlyList[CadSheetSetProperty]
Gets the custom properties in the order of the file (AutoCAD's: by name, letter case ignored). On the sheet set the list holds the definitions of both owners, the sheet-owned ones carrying the default value; on a sheet it holds that sheet's values.
Description
@property
def Description(self) -> str
@Description.setter
def Description(self, value: str | None) -> None
Gets or sets the description; empty for none, which the file leaves out.
Id
@property
def Id(self) -> str
Gets the ID of the part in the file (a g and an upper-case GUID), which stays as long as the part is in the set.
Parent
@property
def Parent(self) -> CadSheetSubset | None
Gets the subset the part is in; null for the sheet set itself.
Methods
FindCustomProperty
def FindCustomProperty(self, name: str) -> CadSheetSetProperty
Finds a custom property by name, letter case ignored.
RemoveCustomProperty
def RemoveCustomProperty(self, name: str) -> bool
Takes a custom property out, by name, letter case ignored.
SetCustomProperty
def SetCustomProperty(self, name: str, value: str, flags: CadSheetSetPropertyFlags) -> None
Sets a custom property: the value and the owner bits of the property of that name (letter case ignored) where there is one, else a new property placed in the name order. The property is not copied to the sheets here.