Method CreateFromExample
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
pathstringThe path of the .dst to make; the file must not be there, and its folder must.
namestringThe name of the new sheet set.
descriptionstringThe description, or null for none.
examplePathstringThe path of the example's .dst.
createFolderHierarchyboolWhether 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.