NX Open C++ Reference Guide
|
Represents an object that manages layers
To obtain an instance of this class, refer to BasePart
Created in NX3.0.0.
More...
Public Member Functions | |
void | ApplyMoveToLayerToOwningParts (int newLayer, const std::vector< NXOpen::DisplayableObject * > &objectArray) |
Move the selected objects to the specified layer in their Owning Parts. | |
void | ChangeStates (const std::vector< NXOpen::Layer::StateInfo > &stateArray, bool fitAll) |
Changes the states of the specified layers in the part. | |
void | ChangeStates (const std::vector< NXOpen::Layer::StateInfo > &stateArray) |
Changes the states of the specified layers in the part. | |
void | CopyObjects (int newLayer, const std::vector< NXOpen::NXObject * > &objectArray) |
Copies objects to the specified layer Objects of class Assemblies::Component , DatumAxis , DatumPlane Edge , Face , Features::Feature or View , may not be copied. | |
std::vector< NXOpen::NXObject * > | GetAllObjectsOnLayer (int layer) |
Returns all objects on the specified layer. | |
NXOpen::Layer::State | GetState (int layer) |
Gets the state of the specified layer. | |
NXOpen::Layer::StateCollection * | GetStates () |
Gets the states for all layers in the part. | |
void | GetVisibilitiesInView (NXOpen::View *view, std::vector< NXOpen::Layer::StateInfo > &stateArray) |
Gets the visibility of all layers in a specified view. | |
void | MoveDisplayableObjects (int newLayer, const std::vector< NXOpen::DisplayableObject * > &objectArray) |
Moves displayable objects to the specified layer. | |
void | ResetViewVisibilityToGlobal (NXOpen::View *view) |
Resets a view's layer visibility to the global states. | |
void | SetObjectsVisibilityOnLayer (NXOpen::View *view, const std::vector< NXOpen::Layer::StateInfo > &stateArray, bool doUpdate) |
Sets specified layer(s) visibility in a specified view. | |
void | SetState (int layer, NXOpen::Layer::State state) |
Sets the state of the specified layer. | |
void | SetState (int layer, NXOpen::Layer::State state, bool fitAll) |
Sets the state of the specified layer. | |
void | SetStates (NXOpen::Layer::StateCollection *stateCollection, bool fitAll) |
Sets the states for all layers in the part. | |
void | SetStates (NXOpen::Layer::StateCollection *stateCollection) |
Sets the states for all layers in the part. | |
void | SetWorkLayer (int newWorkLayer) |
Sets the work layer. | |
tag_t | Tag () const |
Returns the tag of this object. | |
int | WorkLayer () |
Returns the work layer. | |
Represents an object that manages layers
To obtain an instance of this class, refer to BasePart
Created in NX3.0.0.
void NXOpen::Layer::LayerManager::ApplyMoveToLayerToOwningParts | ( | int | newLayer, |
const std::vector< NXOpen::DisplayableObject * > & | objectArray | ||
) |
Move the selected objects to the specified layer in their Owning Parts.
This only works when a single layer has been selected on the Layer Settings dialog. <br> The owning parts will be fully loaded if they are not already. <br> <br> Objects of class @link CAE::CAEEdge CAE::CAEEdge@endlink , @link CAE::CAEFace CAE::CAEFace@endlink , @link CAE::CAEVertex CAE::CAEVertex@endlink , @link Edge Edge@endlink , @link Face Face@endlink or @link View View@endlink may not be moved. <br>
Created in NX7.5.0.
License requirements : solid_modeling ("SOLIDS MODELING") OR drafting ("DRAFTING")
newLayer | The layer in the owning parts to move the objects to |
objectArray | The objects to be moved |
void NXOpen::Layer::LayerManager::ChangeStates | ( | const std::vector< NXOpen::Layer::StateInfo > & | stateArray, |
bool | fitAll | ||
) |
Changes the states of the specified layers in the part.
Note: there must be exactly one work layer. If you change the work layer, you must specify a new work layer. If you set the work layer, the old work layer will be changed to Selectable, unless you specify otherwise. The part must be the displayed part.
Created in NX3.0.0.
License requirements : None
stateArray | Indicates the new states for the layers. |
fitAll | Whether to refit the view to what is visible after the layer states have been changed |
void NXOpen::Layer::LayerManager::ChangeStates | ( | const std::vector< NXOpen::Layer::StateInfo > & | stateArray | ) |
Changes the states of the specified layers in the part.
Note: there must be exactly one work layer. If you change the work layer, you must specify a new work layer. If you set the work layer, the old work layer will be changed to Selectable, unless you specify otherwise. The part must be the displayed part.
Created in NX3.0.0.
License requirements : None
stateArray | Indicates the new states for the layers. |
void NXOpen::Layer::LayerManager::CopyObjects | ( | int | newLayer, |
const std::vector< NXOpen::NXObject * > & | objectArray | ||
) |
Copies objects to the specified layer
Objects of class Assemblies::Component , DatumAxis , DatumPlane Edge , Face , Features::Feature or View , may not be copied.
Objects of type UF_cs2_vertex_type may not be copied.
The part must be the work part.
Created in NX4.0.0.
License requirements : solid_modeling ("SOLIDS MODELING") OR drafting ("DRAFTING")
newLayer | The layer to move the objects to |
objectArray | The objects to be copied |
std::vector<NXOpen::NXObject *> NXOpen::Layer::LayerManager::GetAllObjectsOnLayer | ( | int | layer | ) |
Returns all objects on the specified layer.
The part must be the displayed part.
layer | layer |
NXOpen::Layer::State NXOpen::Layer::LayerManager::GetState | ( | int | layer | ) |
Gets the state of the specified layer.
The part must be the displayed part.
layer | layer |
NXOpen::Layer::StateCollection* NXOpen::Layer::LayerManager::GetStates | ( | ) |
Gets the states for all layers in the part.
The part must be the displayed part.
void NXOpen::Layer::LayerManager::GetVisibilitiesInView | ( | NXOpen::View * | view, |
std::vector< NXOpen::Layer::StateInfo > & | stateArray | ||
) |
Gets the visibility of all layers in a specified view.
The part must be the displayed part.
Created in NX4.0.3.
License requirements : None
view | The view object being queried |
stateArray | The current states for the layers. The returned states can only be Layer::StateVisible and Layer::StateHidden . state_array[i] is for layer i+1 |
void NXOpen::Layer::LayerManager::MoveDisplayableObjects | ( | int | newLayer, |
const std::vector< NXOpen::DisplayableObject * > & | objectArray | ||
) |
Moves displayable objects to the specified layer.
The specified part may be the displayed part or the work part. If it is the work part but not the displayed part, then none of the objects to be moved may be currently displayed. <br> This method is the preferred way to change the layer of one or more objects, because @link DisplayableObject::SetLayer DisplayableObject::SetLayer@endlink does not correct the display of the objects and does not work as expected for sketches and components, because it does not move the members of the sketch or component. <br> <br> Objects of class @link CAE::CAEEdge CAE::CAEEdge@endlink , @link CAE::CAEFace CAE::CAEFace@endlink , @link CAE::CAEVertex CAE::CAEVertex@endlink , @link Edge Edge@endlink , @link Face Face@endlink or @link View View@endlink may not be moved. <br>
Created in NX5.0.0.
License requirements : solid_modeling ("SOLIDS MODELING") OR drafting ("DRAFTING")
newLayer | The layer to move the objects to |
objectArray | The objects to be moved |
void NXOpen::Layer::LayerManager::ResetViewVisibilityToGlobal | ( | NXOpen::View * | view | ) |
Resets a view's layer visibility to the global states.
The part must be the displayed part.
Created in NX4.0.0.
License requirements : None
view | The view object |
void NXOpen::Layer::LayerManager::SetObjectsVisibilityOnLayer | ( | NXOpen::View * | view, |
const std::vector< NXOpen::Layer::StateInfo > & | stateArray, | ||
bool | doUpdate | ||
) |
Sets specified layer(s) visibility in a specified view.
The part must be the displayed part.
Created in NX4.0.0.
License requirements : None
view | The view object being modified |
stateArray | The new states for the layers. The given states may only be Layer::StateVisible and Layer::StateHidden . |
doUpdate | Whether to update the view(s) after the layer states have been changed |
void NXOpen::Layer::LayerManager::SetState | ( | int | layer, |
NXOpen::Layer::State | state | ||
) |
Sets the state of the specified layer.
The specified layer must not be the work layer. If you are changing the state of the layer to Work, the old work layer will be changed to Selectable. The part must be the displayed part.
Created in NX3.0.0.
License requirements : None
layer | layer |
state | state |
void NXOpen::Layer::LayerManager::SetState | ( | int | layer, |
NXOpen::Layer::State | state, | ||
bool | fitAll | ||
) |
Sets the state of the specified layer.
The specified layer must not be the work layer. If you are changing the state of the layer to Work, the old work layer will be changed to Selectable. The part must be the displayed part.
Created in NX3.0.0.
License requirements : None
layer | layer |
state | state |
fitAll | Whether to refit the view to what is visible after the layer state has been changed |
void NXOpen::Layer::LayerManager::SetStates | ( | NXOpen::Layer::StateCollection * | stateCollection, |
bool | fitAll | ||
) |
Sets the states for all layers in the part.
The part must be the displayed part. Note: there must be exactly one work layer.
Created in NX3.0.0.
License requirements : None
stateCollection | The states for all layers in the part. |
fitAll | Whether to refit the view to what is visible after the layer states have been changed |
void NXOpen::Layer::LayerManager::SetStates | ( | NXOpen::Layer::StateCollection * | stateCollection | ) |
Sets the states for all layers in the part.
The part must be the displayed part. Note: there must be exactly one work layer.
Created in NX3.0.0.
License requirements : None
stateCollection | The states for all layers in the part. |
void NXOpen::Layer::LayerManager::SetWorkLayer | ( | int | newWorkLayer | ) |
Sets the work layer.
If you change the work layer, the old work layer is changed to Selectable. The part must be the displayed part.
Created in NX3.0.0.
License requirements : None
newWorkLayer | Layer number for the new work layer |
tag_t NXOpen::Layer::LayerManager::Tag | ( | ) | const |
Returns the tag of this object.
int NXOpen::Layer::LayerManager::WorkLayer | ( | ) |
Returns the work layer.
If you change the work layer, the old work layer is changed to Selectable. The part must be the displayed part.
Created in NX3.0.0.
License requirements : None