File3dmLayerTable

File3dmLayerTable

Provides access to layers in the 3dm file.

Methods

add()

...

addLayer(name, color) → {int}

Easy way to add a layer to the model
Parameters:
Name Type Description
name string new layer name
color System.Drawing.Color new layer color
Returns:
If layer_name is valid, the layer's index (>=0) is returned. Otherwise, RhinoMath.UnsetIntIndex is returned.
Type
int

count()

...

findId()

...

findIndex(index) → {Layer}

Retrieves a Layer object based on Index. This search type of search is discouraged. We are moving towards using only IDs for all tables.
Parameters:
Name Type Description
index int The index to search for.
Returns:
A Layer object, or null if none was found.
Type
Layer

findName(name, parentId) → {Layer}

Finds a Layer given its name.
Parameters:
Name Type Description
name string The name of the Layer to be searched.
parentId Guid The id of the parent Layer to be searched.
Returns:
A Layer, or null on error.
Type
Layer

get()

...