Table of Contents

Method CreateFromExample

Namespace
OpenCAD2D.SheetSets
Assembly
OpenCAD2D.Core.dll

CreateFromExample(string, string, string, string, bool)

Makes a sheet set from an example, as the wizard's first route does: the example's organisation and settings are kept (its subsets, nested as they are, its custom properties, sheet creation template and folder, publish options, view categories and the parts this program does not model) and its sheets are left out. Every part has an ID of its own, every file the example names is named again relative to the new .dst, a folder that was the example's own folder becomes the new one, and the file is saved with DbVersion "1.1" and FileRevision 1.

public static CadSheetSetFile CreateFromExample(string path, string name, string description, string examplePath, bool createFolderHierarchy)

Parameters

path string

The path of the .dst to make; the file must not be there, and its folder must.

name string

The name of the new sheet set.

description string

The description, or null for none.

examplePath string

The path of the example's .dst.

createFolderHierarchy bool

Whether each subset gets a folder, named after it and inside its parent's, made on disk and set as the subset's sheet location (Create a folder hierarchy based on subsets).

Returns

CadSheetSetFile

The file, as saved.

Exceptions

ArgumentNullException

Thrown when the path, the name or the example is null.

FileNotFoundException

Thrown when the example is not there.

FormatException

Thrown when the example is not a sheet set data file.

IOException

Thrown when a file is already at the path.