Table of Contents

Method Bind

Namespace
OpenCAD2D.SheetSets
Assembly
OpenCAD2D.Core.dll

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 ####.

public static int Bind(CadDocument document, string layoutName, CadSheetSetFile file, CadSheetSetSheet sheet)

Parameters

document CadDocument

The sheet's drawing.

layoutName string

The name of the layout that is the sheet.

file CadSheetSetFile

The sheet set the sheet is in.

sheet CadSheetSetSheet

The sheet, of file.

Returns

int

How many fields were bound.

Exceptions

ArgumentNullException

Thrown when any argument is null.