CadSheetSet
from OpenCAD2D.SheetSets import CadSheetSet
class CadSheetSet(CadSheetSubset) ยท CadSheetSet in the .NET reference
The sheet set: the group at the top of the Sheet List, with its name and description, its project fields, the sheet creation template and the folder new sheets go to (inherited from CadSheetSubset), the page setup overrides file, the label block, the resource locations (the folders of the Model Views tab) and the view categories. Taken from CadSheetSetFile.SheetSet.
Properties and fields
LabelBlock
@property
def LabelBlock(self) -> CadDrawingReference | None
@LabelBlock.setter
def LabelBlock(self, value: CadDrawingReference | None) -> None
Gets or sets the block that labels a view placed on a sheet (DefLabelBlk); null for none.
PageSetupOverrides
@property
def PageSetupOverrides(self) -> CadFileReference | None
@PageSetupOverrides.setter
def PageSetupOverrides(self, value: CadFileReference | None) -> None
Gets or sets the drawing template that holds the page setups a sheet can be published with in place of its own (AltPageSetups); null for none.
ProjectMilestone
@property
def ProjectMilestone(self) -> str
@ProjectMilestone.setter
def ProjectMilestone(self, value: str | None) -> None
Gets or sets the project milestone (ProjectMilestone).
ProjectName
@property
def ProjectName(self) -> str
@ProjectName.setter
def ProjectName(self, value: str | None) -> None
Gets or sets the project name (ProjectName).
ProjectNumber
@property
def ProjectNumber(self) -> str
@ProjectNumber.setter
def ProjectNumber(self, value: str | None) -> None
Gets or sets the project number (ProjectNumber).
ProjectPhase
@property
def ProjectPhase(self) -> str
@ProjectPhase.setter
def ProjectPhase(self, value: str | None) -> None
Gets or sets the project phase (ProjectPhase).
PublishOptions
@property
def PublishOptions(self) -> CadSheetSetPublishOptions
Gets what the set keeps for publishing: the output folder, one file or a file each, the file name prompt and the publishing order.
ResourceLocations
@property
def ResourceLocations(self) -> System.Collections.Generic.IReadOnlyList[CadFileReference]
Gets the folders the Model Views tab lists (Resources), in the order they were added.
ViewCategories
@property
def ViewCategories(self) -> System.Collections.Generic.IReadOnlyList[CadViewCategory]
Gets the view categories, in the order of the file; a new set holds one with no name.
Methods
AddCustomProperty
def AddCustomProperty(self, name: str, defaultValue: str, owner: CadSheetSetPropertyFlags) -> None
Adds a custom property as Add Custom Property does (D10). The name must not be empty, must not hold a dot or a double quote (a field could not carry it) and must not be one of the set's properties already, letter case ignored. A property of the sheet set's own is held by the set alone. A property of every sheet is held by the set as its definition, with the default value, and given at that value to every sheet in the set, in subsets and out of them; a sheet made later takes it at the default.
AddResourceLocation
def AddResourceLocation(self, location: CadFileReference) -> None
Adds a folder to the resource locations, at the end.
AddViewCategory
def AddViewCategory(self, name: str, description: str) -> CadViewCategory
Adds a view category, at the end.
CheckLayouts
def CheckLayouts(self, drawingFile: str) -> System.Collections.Generic.IReadOnlyList[CadSheetImportLayout]
Checks the layouts of a drawing for Import Layouts as Sheets and for the wizard's Choose Layouts page: each layout but Model, in the order of the tabs, with the reason it cannot become a sheet where it cannot. A layout is refused when its name holds a # (a sheet set cannot use it), when it is a sheet of this set already, or when it is a sheet of another sheet set that is there: the set the drawing's mark names, if it is not this one and still lists the layout. A drawing that is not a DWG has no layout that can be a sheet.
DeleteCustomProperty
def DeleteCustomProperty(self, name: str) -> bool
Deletes a custom property from the set and, where it is one of every sheet, from every sheet (D10); letter case of the name ignored.
Find
def Find(self, id: str) -> CadSheetComponent
Finds a sheet or subset of the whole set by its CadSheetComponent.Id.
PageSetupOverrideNames
def PageSetupOverrideNames(self) -> System.Collections.Generic.IReadOnlyList[str]
Gets the names of the page setups in the page setup overrides file, in the order the file has them.
RemoveResourceLocationAt
def RemoveResourceLocationAt(self, index: int) -> None
Takes a folder out of the resource locations.
RemoveViewCategory
def RemoveViewCategory(self, category: CadViewCategory) -> None
Takes a view category out; the sheet views that named it are left with no category.
ResaveAllSheets
def ResaveAllSheets(self) -> System.Collections.Generic.IReadOnlyList[CadSheetSetSheet]
Opens every sheet's drawing and saves it again, as Resave All Sheets does, so that the drawings and the set agree: the sheet takes the name, handle and file the layout has now (found as CadSheetSetSheet.FindLayout finds it), the drawing is given the sheet set mark and saved as a DWG of AutoCAD 2018, once for all the sheets that are layouts of it. A sheet that is missing is left as it is.