CATPLMUIInterfaces Interface CATIPLMObjectSelector

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


interface CATIPLMObjectSelector

This interface provides access to UI for any PLM entity selection.

This Object Selector can load a PLM entity in session or select an entity already in session.
If the caller is a CATCommand and not a CATDialog, you should call:

Example:
 
 CATCommand * pCmd = NULL;
HRESULT hr = pObjectSelector -> StartCommand(pCmd);
if (SUCCEEDED(hr) && CATSysCheckExpression(NULL != pCmd))
pCmd -> SetFather();
in order to let the caller receive the notifications.
See also:
, interface.
The PLM Object Selector launches a dialog panel to allow the user to retrieve a PLM entity. The user can do it through a user interface to query from the underlying database, or retrieved already loaded PLM entities from session, or select a PLM entity in any window. If the PLM entity is not already loaded, the PLM entity is loaded when the OK button of the dialog panel is pressed.
This Interface serves the following purpose:


Method Index


o GetSelection(CATBaseUnknown*&)
Retrieve the selected PLM Entity.
o GetSelectionCancelledNotification(CATNotification*&)
Retrieves the the Cancel notification.
o GetSelectionEndedNotification(CATNotification*&)
Retrieves the End Selection notification.
o GetVisibility(unsigned long&)
Retrieve the current display state of the dialog object.
o SetAttributesScope(CATListValCATBaseUnknown_var*&)
Defines some public attribute-value pairs.
o SetDataOrigins(CATListOfInt&)
Declare tab pages which should appear in the ObjectSelector dialog.
o SetObjectScopeFromType(CATIType_var&)
Sets the PLM Type of the PLM entity to respect.
o SetTitle(CATUnicodeString&)
Sets the NLS title of the dialog object (PLM Object Selector panel).
o SetVisibility(unsigned long)
Sets the current display state of the dialog object (PLM Object Selector panel).
o StartCommand(CATCommand*&)
Launches the PLM Object Selector command and its dialog panel.

Methods


o GetSelection
public virtual GetSelection( oSelection)
Retrieve the selected PLM Entity.
Role:This method enables you to retrieve the selected PLM Entity.
This method can be called only once the end notification has been received(when the OK button is pressed).

In order to manage correctly the PLM Entity in session, you have to set into a bag until you don't need it.

Parameters:
oSelection
[out, CATBaseUnknown#Release] The selected PLM Entity. The pointer must be released.
Returns:
  • S_OK if succeeded
  • E_FAIL otherwise
o GetSelectionCancelledNotification
public virtual GetSelectionCancelledNotification( opDiaCANCELNotification)
Retrieves the the Cancel notification.
Role: It is the notification sent by the Object Selector dialog panel, when the Cancel button is pressed.
Parameters:
opDiaCANCELNotification
When the end user clicks on close button.
Returns:
  • S_OK if succeeded
  • E_FAIL otherwise
o GetSelectionEndedNotification
public virtual GetSelectionEndedNotification( opDiaOKNotification)
Retrieves the End Selection notification.
Role: The method returns the notification sent by the Object Selector dialog panel, when the OK button is pressed.

If the PLM Entity is not already opened in the authoring session, it is done by this method.

Parameters:
opDiaOKNotification
When the end user clicks on OK button.
Returns:
  • S_OK if succeeded
  • E_FAIL otherwise
o GetVisibility
public virtual GetVisibility( oState)
Retrieve the current display state of the dialog object.
Role: This Method if effective only after the call to the StartCommand method
Parameters:
oState
The visibility state is:
  • CATDlgShow if the dialog object is shown
  • CATDlgHide if the dialog object is hidden.
Returns:
  • S_OK if succeeded
  • E_FAIL otherwise
o SetAttributesScope
public virtual SetAttributesScope( iListOfCkeAttributes)
Defines some public attribute-value pairs. RoleThis method defines a set of public PLM Attribute-value pairs to respect. This method is not mandatory. If you do not call this method, no filter attribute is done. The attribute-values set are visible in the "Advanced Search" panel, only if those are defined in the EZQuery mask scope of the PLM Entity type queried. The attribute-value could be set in user-defined access mode (read, write) in the "Advanced Search" panel. This Method is effective only before the call to the StartCommand method.
Parameters:
iListOfCkeAttributes
It is a list of CATICkeParm object. Each element of the list represents a valid PLM Attribute-value set. By valid, it is implied, those attributes are associated with the PLM Entity type, being queried Use the Knowledge API to create these CATICkeParm object.
Some useful information:
  • About the PLM Attribute value
  • About the PLM Attribute's editor editability

  • By default the PLM Attribute values in the "Advanced Search" panel are editable, but you can switch it to non-editable mode like this: Ofcourse, this is relevant provided the Attribute is listed in the Advanced Search panel (defined in the EZQuery mask scope)
              CATICkeParm::UserAccessMode WantedRights = CATICkeParm::ReadOnly;
              spCkeParm -> SetUserAccess (WantedRights); 
             
Returns:
  • S_OK if succeeded
  • E_FAIL otherwise
o SetDataOrigins
public virtual SetDataOrigins( const iListOfDataOrigins)
Declare tab pages which should appear in the ObjectSelector dialog.
Parameters:
iListOfDataOrigins
The List of wanted tab pages for the ObjectSelector dialog : CATPLMObjectSelectorFile to see the tabpage "From File" CATPLMObjectSelectorQuery to see the tabpage "From Search" CATPLMObjectSelectorSession to see the tabpage "From Session" The first element in iListOfDataOrigins is the tabpage activated by default.
Returns:
  • S_OK if succeeded
  • E_FAIL otherwise
o SetObjectScopeFromType
public virtual SetObjectScopeFromType( ispIDataScope)
Sets the PLM Type of the PLM entity to respect.
Role: This method sets the PLM Type of the PLM entity to respect
This Method if effective only before the StartCommand method !.
Parameters:
ispIDataScope
The PLM Type of the PLM entity to respect.
Returns:
  • S_OK if succeeded
  • E_FAIL otherwise
o SetTitle
public virtual SetTitle( iTitle)
Sets the NLS title of the dialog object (PLM Object Selector panel).
Role:This method if effective only after the call to the StartCommand method.
Parameters:
iTitle
title of the PLMChooser
Returns:
  • S_OK always.
  • If the given title is empty, a default title is taken into account "Object Selection".
o SetVisibility
public virtual SetVisibility( iState)
Sets the current display state of the dialog object (PLM Object Selector panel).
Role:This method if effective only after the call to the StartCommand method.
Parameters:
iState
The visibility state is:
  • CATDlgShow if the dialog object is shown
  • CATDlgHide if the dialog object is hidden.
Returns:
  • S_OK if succeeded
  • E_FAIL otherwise
o StartCommand
public virtual StartCommand( opEventPublisher)
Launches the PLM Object Selector command and its dialog panel.
Parameters:
opEventPublisher
Corresponding command pointer. The method handles the lifecycle of this dialog box command. This pointer must not be released!
Returns:
  • S_OK if succeeded
  • E_FAIL otherwise

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

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