Table of Contents

Class CadSheetSetFields

Namespace
OpenCAD2D.SheetSets
Assembly
OpenCAD2D.Core.dll

The \AcSm fields of a drawing: a title block's %<\AcSm Sheet.Number>%, a set's own %<\AcSm SheetSet.Client>% and the bound form AutoCAD writes into a drawing once the drawing is a sheet, \AcSm Database("D:\Tower\Tower.dst").SheetSet("g…").Component("g…").Number. They are evaluated as AutoCAD 2021 evaluates them (each result below was read from AutoCAD's own FIELD objects for a sheet A-101 "Ground floor" in the subset Plans); the field dialog's CurrentSheetNumber and its kin write the unbound form and no \AcVar, which AutoCAD shows as ####.

public static class CadSheetSetFields
Inheritance
CadSheetSetFields
Inherited Members

Remarks

A field is of one component of a set: Sheet, Subset (the subset the sheet is in) or SheetSet; the names of the component and of its property are read in any letter case. Sheet has Number, Title, NumberAndTitle (A-101 - Ground floor; the title alone with no number), Description, Category, RevisionNumber, RevisionDate, IssuePurpose and Name, then the sheet's custom properties (the sheet's own value, else the default of the set's definition). Subset has Name and Description. SheetSet has Name, Description, ProjectNumber, ProjectName, ProjectPhase, ProjectMilestone, then the set's custom properties. A property with no value shows ----; a name the component does not have shows ####. A placeholder, ?Sheet.Number or ?View.Title, shows its own name (SheetNumber, ViewTitle) until a block that holds it is bound.

The sheet of an unbound field is the one whose drawing is the field's own and whose layout is the layout the field is on (found by its handle, else its name), in the set the drawing's link names (AcSheetSetData). Where the set's file is no longer where the link or the code says it is, the file is looked for the same distance from the drawing as it was when the link was written, which finds a set moved with its sheets. A field whose set or sheet cannot be reached keeps the words it showed; one never evaluated shows ####.

Methods

Bind(CadDocument, string, CadSheetSetFile, CadSheetSetSheet)

Binds the unbound fields of one layout of a sheet's drawing to its sheet, as AutoCAD does when a sheet is made or a layout imported: \AcSm Sheet.Number becomes \AcSm Database("…\Tower.dst").SheetSet("g…").Component("g…").Number with the sheet's ID, Subset.Name the same with the subset's ID, and SheetSet.Client the same with no component, so that AutoCAD shows the right words in a sheet made here. The fields are evaluated again; a placeholder, a field already bound and a field of another evaluator are left as they are, and so is every field of another layout or of model space. A sheet in the set itself has no subset, so its Subset.Name stays unbound and shows ####.