All Frameworks  Class Hierarchy  This Framework  Previous  Indexes

CATxPDMInterfaces Interface CATIxPDMSession

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---CATIxPDMSession
 

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


interface CATIxPDMSession

Interface to retrieve an item associated with a document in the current editor.
Role: This interface is used to retrieve an item from a document (a file) which is in relationship with the current editor:

Refer to the ApplicationFrame framework API for more details about the editor and its associated files.

This interface is implemented on the unique CATApplicationFrame instance. Use it only into an CATIA V5 interactive command.

Example:
This example returns the root item of the current editor
 CATApplicationFrame *pApplication = CATApplicationFrame::GetFrame();
 CATIxPDMItem_var xPDMItem;
 CATIxPDMSession_var xPDMSession(pApplication);
 if ( NULL_var != xPDMSession )
 {
    xPDMSession->GetRootItem(xPDMItem);
    ....
 

All the methods pre-requisites the PX1 license

See also:
CATIxPDMItem


Method Index


o GetCurrentItem(CATIxPDMItem_var&)
Retrieves the item associated with the current selected file of the current editor.
o GetRootItem(CATIxPDMItem_var&)
Retrieves the item associated with the document (root file) of the current editor.

Methods


o GetCurrentItem
public virtual HRESULT GetCurrentItem(CATIxPDMItem_var& oCurrentItem) = 0
Retrieves the item associated with the current selected file of the current editor.
Parameters:
oxPDMItem
The item created (or retrieved) from the current selected document associated with the current editor. If no document is selected the root item is returned.
Returns:
  • S_OK: The item is successfully retrieved.
  • E_FAIL: No editor in the session.
o GetRootItem
public virtual HRESULT GetRootItem(CATIxPDMItem_var& oRootItem) = 0
Retrieves the item associated with the document (root file) of the current editor.
Parameters:
oxPDMItem
The item created (or retrieved) from the document associated with the current editor.
Returns:
  • S_OK: The root item is successfully retrieved.
  • E_FAIL: No editor in the session.

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

Copyright © 2003, Dassault Systèmes. All rights reserved.