Properties
This count also spans table slots emptied by a purge, so it can be larger than the number of section styles that are actually there. See the remarks on the indexer.
Indexers
Detaching a worksession reference model, or purging a linked instance definition, removes its section styles but leaves the table slots they occupied empty. The slots cannot be closed up, because table indices are persistent references that objects store, so renumbering would repoint existing objects at the wrong component. Count spans the empty slots, and they accumulate for the life of the document - one per purge.
An index that lands on an empty slot returns a SectionStyle that throws DocumentCollectedException on every property access, so code that walks this table by index must expect it. To tell a real section style from an empty slot, compare the index you asked for with SectionStyle.Index: an empty slot never reports the index you asked for. Enumerating the table with foreach goes through the document manifest rather than the raw table array, so it does not visit empty slots at all and is the safer way to walk the table.
The layer, linetype, material and hatch pattern tables answer the same situation differently: they return a stand-in component whose Index is -1 rather than one that throws. See RH-97389.
| index (int) | zero based array index. |
Methods
| sectionstyle (SectionStyle) | Definition of new section style. The information in sectionstyle is copied. If sectionstyle.Name is empty then a unique name of the form "SectionStyle 01" will be automatically created. |
| sectionstyle (SectionStyle) | Definition of new section style. The information in sectionstyle is copied. If sectionstyle.Name is empty then a unique name of the form "SectionStyle 01" will be automatically created. |
Clear
| item (SectionStyle) | The section style to delete. |
| sectionStyleIndices (IEnumerable<int>) | An enumeration of section style indices. |
| quiet (bool) | If true, no warning message box appears if a section style is in use. |
| deleteWarning (int) | Action to take when multiple delete warnings occur, where: 0 == No to all, 1 == Yes to all, 2 == Ask the user. |
| sectionStyleIndices (IEnumerable<int>) | An enumeration of section style indices. |
| quiet (bool) | If true, no warning message box appears if a section style is in use. |
| name (string) | The name of the section style to find. The search ignores case. |
FindId
| index (int) | The index to search for. |
| name (string) | The name of the section style to find. |
| index (int) | The index of the section style to query. |
| instanceDefinitionCount (out int) | The number of instance definitions using this section style. |
| objectCount (out int) | The number of Rhino objects using this section style. |
| layerCount (out int) | The number of layers using this section style. |
| sectionstyle (SectionStyle) | New sections style settings. This information is copied. |
| index (int) | Zero based index of section style to set. |
| quiet (bool) | if true, information message boxes pop up when illegal changes are attempted. |
| item (SectionStyle) |