StateCollection Class¶
-
class
NXOpen.Layer.
StateCollection
¶ Bases:
NXOpen.TransientObject
Represents a copy of the layer states.
You can manipulate the StateCollection without affecting the actual layer states in the part. Your changes to the StateCollection will not be applied to the part until you apply them through the method
Layer.LayerManager.SetStates()
. .. versionadded:: NX3.0.0
Methods¶
Method | Description |
---|---|
Dispose | Frees the object from memory. |
GetState | Returns the state of the specified layer |
SetState | Sets the state of the specified layer |
SetStateOfCategory | Sets the state of every layer in the category to the specified state, except the work layer |
Method Detail¶
Dispose¶
-
StateCollection.
Dispose
¶ Frees the object from memory.
After this method is called, it is illegal to use the object. In .NET, this method is automatically called when the object is deleted by the garbage collector.
Signature
Dispose()
New in version NX3.0.0.
License requirements: None.
GetState¶
-
StateCollection.
GetState
¶ Returns the state of the specified layer
Signature
GetState(layer)
Parameters: layer (int) – Returns: Return type: NXOpen.Layer.State
New in version NX3.0.0.
License requirements: None.
SetState¶
-
StateCollection.
SetState
¶ Sets the state of the specified layer
Signature
SetState(layer, state)
Parameters: - layer (int) –
- state (
NXOpen.Layer.State
) –
New in version NX3.0.0.
License requirements: None.
SetStateOfCategory¶
-
StateCollection.
SetStateOfCategory
¶ Sets the state of every layer in the category to the specified state, except the work layer
Signature
SetStateOfCategory(category, state)
Parameters: - category (
NXOpen.Layer.Category
) – - state (
NXOpen.Layer.State
) – new state for the category. Must not beLayerState.WorkLayer
New in version NX3.0.0.
License requirements: None.
- category (