All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

MechanicalModelerUI Class CATFeatureImportAgent

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---System.CATEventSubscriber
        |
        +---System.CATCommand
          |
          +---DialogEngine.CATDialogAgent
            |
            +---DialogEngine.CATAcquisitionAgent
              |
              +---DialogEngine.CATPathElementAgent
                |
                +---MechanicalModelerUI.CATFeatureAgent
                  |
                  +---CATFeatureImportAgent
 

Usage: you must use this class as is. You should never derive it.


public class CATFeatureImportAgent

Class to select in Mechanical context with import possibilities.
Role:This agent of selection is dedicated for mechanical features. In addition to the CATFeatureAgent possibilities, this agent enables you, in assembly context, to import in a Part, specified by CATFeatureAgent.SetActiveObjectPath , the selection done in another Part document. The imported object is aggregated by the "External References" feature of a Part document. However contrary to the CATFeatureAgent, you cannot prohibit the selection outside the current component (a Part or a Product of a Product document).

The CATPathElementAgent.GetValue, for this agent, returns the path of the selected object. In case of import, it is the path of the imported object.


Constructor and Destructor Index


o CATFeatureImportAgent(CATString&,CATClassId,CATDlgEngBehavior,CATMfFeaturizeMode,CATBaseUnknown_var&,CATImportAgentBehavior)
Constructs a path element agent.
o ~CATFeatureImportAgent()

Method Index


o HowManyElementsCreated(CATPathElement*)
Returns the count of elements created by the import.
o SetAgentBehavior(CATMfFeaturizeMode,CATBaseUnknown_var&,CATImportAgentBehavior)
Sets the agent behavior.
o SetImportApplicativeId(GUID&)
Sets an applicative identifier on the imported feature(s).

Constructor and Destructor


o CATFeatureImportAgent
public CATFeatureImportAgent( const CATString& iId,
CATClassId iType= NULL,
CATDlgEngBehavior iBehavior= NULL,
CATMfFeaturizeMode iMode= NULL,
const CATBaseUnknown_var& iSupport= NULL_var,
CATImportAgentBehavior iAgBehavior= NULL)
Constructs a path element agent.
Parameters:
iId
The agent identifier. It is used to retrieve the undo/redo titles in the command resource file.
iType
The type of the expected objects. The type corresponds to an interface implemented by the object.
If it is NULL, all the objects are accepted.
You can add interfaces with
CATPathElementAgent.AddElementType or you can specified later an ordered list thanks to the CATPathElementAgent.SetOrderedTypeType method.
iBehavior
The agent behavior. The behavior is given in the form of a concatenation of the facet values using the | character. Refer to the
CATPathElementAgent.CATPathElementAgent method for details about the valid facets.
However, for the two following facets the default value is the opposite of the CATPathElementAgent class.
  • Tooltip: CATDlgEngWithTooltip is the default and not CATDlgEngWithoutTooltip.
  • User Selection Filter: CATDlgEngWithUserSelectionFilter is the default and not CATDlgEngWithoutUserSelectionFilter.

The behavior may be specified later with the CATDialogAgent.SetBehavior method.
iMode
The featurization mode to featurized the selected geometry.
Legal values: The featurization mode is defined with options separeted with the | character.
e.g.: MfRelimitedFeaturization|MfPermanentBody
The default featurization mode is the MfNoFeaturization option (=0).
The featurization mode may be specified later with the
SetAgentBehavior method.
iSupport
The support of the featurized object.
Legal values:
  • NULL_var when iMode is MfNoFeaturization or MfFunctionalFeaturization.
  • Otherwise a feature, if it required by the featurization option.

The support of the featurized object may be specified later with the
SetAgentBehavior method.
iAgBehavior
The specific agent behavior. The default behavior (NULL) means:
  • The optimization mode which keeps the decode result is activated.
  • In assembly context, the imported selections are not checked with the interfaces of type.

This behavior may be specified later with the
SetAgentBehavior method.
o ~CATFeatureImportAgent
public virtual ~CATFeatureImportAgent()

Methods


o HowManyElementsCreated
public int HowManyElementsCreated(CATPathElement* iPath)
Returns the count of elements created by the import.
Parameters:
iPath
The agent value that you retrieve with the
CATPathElementAgent.GetValue (mono-sel) and the CATPathElementAgent.GetListOfValues (multi-sel)methods.
Returns:
The count of created elements.
o SetAgentBehavior
public void SetAgentBehavior(CATMfFeaturizeMode iMode,
const CATBaseUnknown_var& iSupport= NULL_var,
CATImportAgentBehavior iAgBehavior= NULL)
Sets the agent behavior.
Parameters:
iMode
The featurization mode to featurized the selected geometry. See CATMfBRepDefs.h .
iSupport
The support of the featurized object.
Legal values: NULL_var when iMode is MfNoFeaturization or MfFunctionalFeaturization. Or the support feature if it is required by the featurization option and known.
iAgBehavior
The specific agent behavior. The default behavior (NULL) means:
  • The optimization mode which keeps the decode result is activated.
  • In assembly context, the imported selections are not checked with the interfaces of type.
o SetImportApplicativeId
public HRESULT SetImportApplicativeId( const GUID& iApplicativeId)
Sets an applicative identifier on the imported feature(s).
Role: it enables to associate an identifier to the imported feature(s).
This identifier allows to retrieve information on the mechanical import(s) using interface CATIMmiMechanicalImportApplicative .
This method only applies if option "Keep link" is checked (in Tools/Options/Part Infrastructure).
Parameters:
iApplicativeId
The unique identifier generated by the application.
  • on Windows, use : uuidgen -s
  • on Unix, use : uuid_gen -C
Refer to the article "About Globally Unique IDentifiers" in the CAA encyclopedia for more details about these two ways of generating a GUID value.
Returns:
S_OK if iApplicativeId is accepted, E_FAIL otherwise.

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

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