NamedLayerStateTable

References
public sealed class NamedLayerStateTable
All named layer states in a Rhino document.

Properties

Count

#Since v6.14
Returns the number of named layers states in the document.
public int Count { get; }

Document

#Since v6.14
Document that owns this table.
public RhinoDoc Document { get; }

Names

#Since v6.14
Returns the names of named layer states in the document.
public string[] Names { get; }

Methods

Delete

#Since v6.14
Deletes an existing named layer state.
public bool Delete(
name
The name of the layer state.
)
True if successful, false otherwise.

FindName

#Since v6.14
Returns the index of an existing named layer state.
public int FindName(
name
The name of the layer state.
)
>0 if successful, -1 if not found.

Import

#Since v6.15
Imports named layer states from a 3dm file.
public int Import(
filename
The name of the file to import.
)
The number of named layers states imported.

Rename

#Since v6.14
Renames an existing named layer state.
public bool Rename(
oldName,
The name of the layer state.
newName
The new name
)
True if successful, false otherwise.

Restore

#Since v6.14
Restores a named layer state.
[CLSCompliant(false)] public bool Restore(
name,
The name of the layer state.
properties,
The layer properties to restore.
viewportId
The id of the layout or detail viewport to restore the per-viewport layer properties.
)

Restore

#Since v6.14
Restores a named layer state.
[CLSCompliant(false)] public bool Restore(
name,
The name of the layer state.
properties
The layer properties to restore.
)
True if successful, false otherwise.

Save

#Since v6.14
Saves or updates a named layer state.
public int Save(
name,
The name of the layer state. If the named layer state already exists, it will be updated.
viewportId
The id of the layout or detail viewport, required to save per viewport layer state properties.
)
The index of the newly added, or updated, layer state.

Save

#Since v6.14
Saves or updates a named layer state.
public int Save(
name
The name of the layer state. If the named layer state already exists, it will be updated.
)
The index of the newly added, or updated, layer state.