Method NewSubset
NewSubset(string, string, bool, int)
Adds a subset as New Subset does: the name must not be empty and must not be the name of a subset
already in this group (letter case ignored); with createFolder the subset gets a folder of its
own, its name inside the folder new sheets of this group go to, made on disk now and set as the subset's
NewSheetLocation, so that its sheets are saved there (Create Folder Hierarchy).
public CadSheetSubset NewSubset(string name, string description, bool createFolder, int index = -1)
Parameters
namestringThe name; for a folder it must also be a name a folder can have.
descriptionstringThe description, or null for none.
createFolderboolWhether the subset gets a folder.
indexintThe place among the subsets and sheets of this group; -1 for the end.
Returns
- CadSheetSubset
The new subset.
Exceptions
- ArgumentNullException
Thrown when the name is null.
- ArgumentException
Thrown when the name is empty, is a sibling subset's, or cannot be a folder's where one is made.
- ArgumentOutOfRangeException
Thrown when the place is not -1 or from 0 to the count of children.
- InvalidOperationException
Thrown outside Change(Action<CadSheetSet>).