InteractiveInterfaces Interface CATIIniDocumentLayersDefinition

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIIniDocumentLayersDefinition

Interface for layer management.
Role: This interface is implemented on V6 concerned representations: Parts and Drawings.
To query or modify the layers do not implement this interface, just query the representation on this interface.
A layer is managed by a pointer to the interface.
The layers you will manage with this interface are stored with the representation in database
You may query this interface on the result object of , or on the objects in the result path of .


Method Index


o Add(CATIIniLayer*&,int,CATUnicodeString,CATUnicodeString)
Adds a Layer.
o Find(int,CATIIniLayer*&)
Retrieves a layer by its number.
o Find(CATUnicodeString,CATIIniLayer*&)
Retrieves a layer by its name.
o GetCurrent(CATIIniLayer*&)
Retrieves the current layer.
o GetList(CATListPtrCATIIniLayer*&)
Retrieves the layer list.
o Remove(CATIIniLayer*&)
Removes a layer.
o SetCurrent(CATIIniLayer*&)
Changes the current layer.

Methods


o Add
public virtual Add( opLayer,
iLayerNumber,
iLayerName= "",
iLayerComment= "")
Adds a Layer. Role: Adds a new layer to the layers list. Notice: you do not create the layer. All the layers always exist, you may just change their default name or give them a description. The layers list only contains the modified layers.
Parameters:
opLayer
The created layer.
  • If a new layer was created, opLayer is set and the returned HRESULT is S_OK ;
  • If an existing layer with the same number but with a different name was found, this layer is renamed, opLayer is set NULL and the returned HRESULT is S_OK ;
  • If an existing layer with the same number and the same name was found, opLayer is set to this layer and the returned HRESULT is S_FALSE ;
iLayerNumber
The layer number.
iLayerName
The layer name (optional). If this name is blank, the default name of the layer will be kept. The default name is built with the "Layer" word (depends on your language) and the layer number.
iLayerComment
The layer comment (optional).
Returns:

Legal values:
  • S_OK if the layer was correctly added
  • S_FALSE if this layer already exists in the list
  • E_FAIL if the layer could not be added
o Find
public virtual Find( iLayerNumber,
opLayer)
Retrieves a layer by its number.
Parameters:
iLayerNumber
The layer number.
opLayer
The layer found.
Returns:

Legal values:
  • S_OK if the layer was found
  • E_FAIL if the layer does not exist
o Find
public virtual Find( iName,
opLayer)
Retrieves a layer by its name.
Parameters:
iName
The layer name.
opLayer
The layer found.
Returns:

Legal values:
  • S_OK if the layer was found
  • E_FAIL if the layer does not exist
o GetCurrent
public virtual GetCurrent( opLayer)
Retrieves the current layer.
Parameters:
opLayer
The Layer. (NULL if there is no current layer)
Returns:

Legal values:
  • S_OK if the current layer was found
  • E_FAIL if no current layer was found
o GetList
public virtual GetList( opList)
Retrieves the layer list.
Parameters:
opList
The list of layers. This pointer must be NULL when calling the method. You have to Release each object of the returned list and then Release the returned list pointer after use.
Returns:

Legal values:
  • S_OK if a layers list was found
  • E_FAIL no layers list was found
o Remove
public virtual Remove( ipLayer)
Removes a layer.
Parameters:
ipLayer
The layer to remove from the list. Notice: you do not delete the layer. All the layers always exist, the layers list only contains the modified layers.
Returns:

Legal values:
  • S_OK if the layer was correctly removed
  • E_FAIL if the layer does not exist
o SetCurrent
public virtual SetCurrent( ipLayer)
Changes the current layer. Role: Set a layer as the current one. This recomputes the visualization because the current layer is always visible so it belongs to the current visualization filter.
Parameters:
ipLayer
The layer. (NULL if no current layer is needed)
Returns:

Legal values:
  • S_OK if the current layer was changed
  • E_FAIL if no current layer was found

This object is included in the file: CATIIniDocumentLayersDefinition.h
If needed, your Imakefile.mk should include the module: CATInteractiveInterfaces

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.