User's Guide > ModelItem > Layer Objects > Layer Operations
Layer Operations
Methods Introduced:
Superseded Method:
The methods pfcLayer::GetStatus and pfcLayer::SetStatus enables you to access the display status of a layer. The display status is contained in the enumerated type pfcDisplayStatus and the valid values are:
pfcLAYER_NORMAL—The selected layer is displayed.
pfcLAYER_DISPLAY—The selected layer is displayed.
pfcLAYER_BLANK—The selected layer is displayed.
pfcLAYER_HIDDEN—The selected layer is displayed.
Use the methods pfcLayer::ListItems, pfcLayer::AddItem, and pfcLayer::RemoveItem to control the contents of a layer.
* 
You cannot add the following items to a layer:
pfcITEM_SURFACE,
pfcITEM_EDGE,
pfcITEM_COORD_SYS,
pfcITEM_AXIS,
pfcITEM_SIMPREP,
pfcITEM_DTL_SYM_DEFINITION,
pfcITEM_DTL_OLE_OBJECT,
pfcITEM_EXPLODED_STATE.
For these items the method will throw the exception pfcXToolkitInvalidType.
The method pfcLayer::Delete removes the layer (but not the items it contains) from the model.
The method pfcLayer::CountUnsupportedItems returns the number of item types not supported as a pfcModelItem object in the specified layer. This method deprecates the method pfcLayer::HasUnsupportedItems.
Use the method wfcLayerItem::GetLayers to find all the layers containing in a given layer item . This method supports layers in solid models and in drawings.
The method wfcLayerItem::IsLayerItemVisible returns the visibility status for the specified item.
Use the methods wfcLayerItem::RemoveNoUpdate and wfcLayerItem::AddNoUpdate to remove and add a specified item from the layer, respectively, without updating the model tree.
Use the method wfcWModel::ExecuteLayerRules to execute the layer rules on the specified model. The rules must be enabled in the layers to be executed.
The method wfcWModel::CopyLayerRules copies the rules from the reference model to the current model for the specified layer. The input arguments are:
LayerName—Specifies the name of an existing layer in both the models. To copy the layer rules, the name of the layer LayerName in both the models must be the same.
RefModel— Specifies the reference model from which the layer rules must be copied.
Use the method wfcWModel::MatchLayerRules to compare the rules between the current and reference model for the specified layer. The name of the layer LayerName in both the models must be the same, for comparing the layer rules.
Was this helpful?