Description:
Finds the layer with a given name. If multiple layers exist that have the same name, the first match layer index will be returned. Deleted layers have no name.
deprecated in 6.0
obsolete: ignoreDeletedLayers is no longer supported for research by name. Use the overload with notFoundReturnValue
Parameters:
- layerName
- Type: string
- name of layer to search for. The search ignores case.
- ignoreDeletedLayers
- Type: bool
- True means don't search deleted layers.
Returns:
Type: int
index of the layer with the given name. If no layer is found, the index of the default layer, -1, is returned.
Available since:
5.0
Description:
Finds a layer with a matching ID.
Parameters:
- layerId
- Type: System.Guid
- A valid layer ID.
- ignoreDeletedLayers
- Type: bool
- If true, deleted layers are not checked.
- notFoundReturnValue
- Type: int
- Should be -1 to get the index of the OpenNURBS default layer, or RhinoMath.UnsetIntIndex to get an always-out-of-bound value.
Returns:
Type: int
The index of the found layer, or notFoundReturnValue.
Available since:
6.0
Description:
Finds a layer with a matching ID.
deprecated in 6.0
obsolete: notFoundReturnValue should be specified. Add a third argument, its previous value was -1 but consider RhinoMath.UnsetIntIndex.
Parameters:
- layerId
- Type: System.Guid
- A valid layer ID.
- ignoreDeletedLayers
- Type: bool
- If true, deleted layers are not checked.
Returns:
Type: int
>=0 index of the layer with the given name -1 no layer has the given name.
Available since:
5.0
Description:
Finds a layer with a given name and matching parent ID.
deprecated in 6.0
obsolete: ignoreDeletedLayers is no longer supported for research by name. Use the overload with notFoundReturnValue
Parameters:
- parentId
- Type: System.Guid
- A valid layer ID.
- layerName
- Type: string
- name of layer to search for. The search ignores case.
- ignoreDeletedLayers
- Type: bool
- If true, deleted layers are not checked. NOT SUPPORTED FOR NAME SEARCH, only for Guids.
Returns:
Type: int
>=0 index of the layer with the given name -1 no layer has the given name.
Available since:
6.0
Description:
Finds a layer with a given name and matching parent ID.
Parameters:
- parentId
- Type: System.Guid
- A valid layer ID.
- layerName
- Type: string
- name of layer to search for. The search ignores case.
- notFoundReturnValue
- Type: int
- Should be -1 to get the index of the OpenNURBS default layer, or RhinoMath.UnsetIntIndex to get an always-out-of-bound value.
Returns:
Type: int
The index of the found layer, or notFoundReturnValue.
Available since:
6.0