All Frameworks Class Hierarchy This Framework Previous Next Indexes
InteractiveInterfaces Interface CATIIniDocumentLayersDefinition
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---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 all V5 documents.
To query or modify the layers do not implement this interface, just query the document on this interface.
A layer is managed by a pointer to the CATIIniLayer interface. The layers you will manage with this interface depend on the context.
- If the ui-active document is edited in an assembly (for example a CATPart in a CATProduct), the layers managed by this interface can be:
- The layers saved in the document (only applied to this document)
if the setting defined in Tools/Options/General/Display/Layer Filter is set to "Current filter of the document"
- The layers saved in the CATSettings (applied to any assembly opened in the session)
if the setting defined in Tools/Options/General/Display/Layer Filter is set to "Current filter on all documents"
- If the ui-active document is a CATProduct, the layers managed are those of the CATSettings.
- If the current document is edited outside of an asembly (it's a CATPart, a CATDrawing, etc...), the layers managed are those of the document.
Method Index
- o
Add(CATIIniLayer*&,int,CATUnicodeString,CATUnicodeString)
- Adds a Layer.
- o
Find(CATUnicodeString,CATIIniLayer*&)
- Retrieves a layer by its name.
- o
Find(int,CATIIniLayer*&)
- Retrieves a layer by its number.
- 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
-
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
-
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 Find
-
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 GetCurrent
-
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 HRESULT GetList( | CATListPtrCATIIniLayer*& | opList) = 0 |
-
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
-
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
-
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