Table of Contents

CadSheetSetSheet

from OpenCAD2D.SheetSets import CadSheetSetSheet

class CadSheetSetSheet(CadSheetComponent) ยท CadSheetSetSheet in the .NET reference

A sheet of a sheet set: a number and a title, and the layout of a drawing it is (CadSheetSetSheet.Layout), with the revision fields, whether it is published, its custom property values and its sheet views. It is named CadSheetSetSheet, not CadSheet, because CadSheet is a sheet of a spreadsheet.

Properties and fields

Category

.NET

@property
def Category(self) -> str
@Category.setter
def Category(self, value: str | None) -> None

Gets or sets the sheet's category, free text.

IncludeForPublish

.NET

@property
def IncludeForPublish(self) -> bool
@IncludeForPublish.setter
def IncludeForPublish(self, value: bool) -> None

Gets or sets whether the sheet is published with its set; the file keeps the opposite, DoNotPlot, and leaves it out for a sheet that is.

IssuePurpose

.NET

@property
def IssuePurpose(self) -> str
@IssuePurpose.setter
def IssuePurpose(self, value: str | None) -> None

Gets or sets the issue purpose.

Layout

.NET

@property
def Layout(self) -> CadDrawingReference | None
@Layout.setter
def Layout(self, value: CadDrawingReference | None) -> None

Gets or sets the drawing and layout the sheet is: the drawing's file, the layout's name, its handle and the handle of its owner. Null for a sheet with no layout yet. Finding the layout in the drawing is not done here.

Number

.NET

@property
def Number(self) -> str
@Number.setter
def Number(self, value: str | None) -> None

Gets or sets the sheet number, free text ("A-101"); empty for none.

RevisionDate

.NET

@property
def RevisionDate(self) -> str
@RevisionDate.setter
def RevisionDate(self, value: str | None) -> None

Gets or sets the revision date, free text.

RevisionNumber

.NET

@property
def RevisionNumber(self) -> str
@RevisionNumber.setter
def RevisionNumber(self, value: str | None) -> None

Gets or sets the revision number.

Title

.NET

@property
def Title(self) -> str
@Title.setter
def Title(self, value: str | None) -> None

Gets or sets the sheet title.

Views

.NET

@property
def Views(self) -> System.Collections.Generic.IReadOnlyList[CadSheetView]

Gets the sheet views (the named model space views placed on the sheet), in the order of the file.

Methods

AddView

.NET

def AddView(
    self,
    number: str,
    title: str,
    namedView: CadDrawingReference,
    category: CadViewCategory,
) -> CadSheetView

Adds a sheet view, at the end.

Associate

.NET

def Associate(self, drawingFile: str, layoutName: str) -> None

Makes the sheet another layout, as the Expected Layout row of the Sheet Properties does for a sheet that is missing: the sheet takes the layout's file, name, handle and owner, and the drawing gets the sheet set mark and is saved as a DWG of AutoCAD 2018.

DefaultFileName

.NET

@staticmethod
def DefaultFileName(number: str, title: str) -> str

The name a new sheet's drawing is saved under unless another is typed: its number, a space and its title ("A-101 Ground floor plan"), the title alone for a sheet with no number, each character a file cannot hold made an underscore. It has no extension.

DefaultLayoutName

.NET

@staticmethod
def DefaultLayoutName(number: str, title: str) -> str

The name a new sheet's layout is given, and the name Rename & Renumber offers: the number, a space and the title, the title alone for a sheet with no number, each character a layout cannot hold (and the #) made an underscore.

FindLayout

.NET

def FindLayout(self) -> CadFoundLayout

Finds the sheet's layout in its drawing (D7): the drawing is the one the sheet's file names (the relative form first), and the layout is the one that has the sheet's handle, else the one that has its name. A sheet whose drawing is gone, or whose drawing has neither, is missing. The drawing is read, not changed.

RemoveView

.NET

def RemoveView(self, view: CadSheetView) -> None

Takes a sheet view out of the sheet.

RenameAndRenumber

.NET

def RenameAndRenumber(
    self,
    number: str,
    title: str,
    layoutName: str | None = ...,
    fileName: str | None = ...,
) -> None

Renames and renumbers the sheet as Rename & Renumber Sheet does (B18). A new number and title are only written into the set. A new layout name renames the layout in the drawing, and a new file name renames the drawing in its folder, so that the drawing is read, given the sheet set mark, saved as a DWG of AutoCAD 2018 under the new name and the old file deleted; every sheet of the set that is a layout of that drawing follows the file. The drawing is only touched when its layout name or its file name changes. A drawing that is open in the app must be saved and closed by the caller first, and opened again after.