All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

MechanicalCommands Interface CATIUdfFeature

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

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


interface CATIUdfFeature

Interface to define a User Feature or a Power Copy reference.
Role: This interface enables to define a user feature (or a power copy) reference.
After the CATIUdfFactory.CreatePowerCopy or CATIUdfFactory.CreateUserFeature you can define with this interface the content of the user feature (or the power copy) reference.

A feature is defined by its components. So by the SetComponents method you define it. After this call, and only after, you can use these following methods:

The method VerifyComponents can be used before the SetComponents method. If the result of the verification is OK you can call SetComponents with the same list of component. (It is certainely the best way)
But you can also call VerifyComponents after the SetComponents method. In this case its argument is NULL. But if the result of the verification is KO, you must delete this current reference and recreate a new one. It is impossible to call twice the SetComponents method.

What is a role ?
For each input, or published parameter you can set a NLS string to define a role. It is a mean to understand the role of the input or the parameter. This string appears in the instantiate dialog box, and in the edit dialog box. In the case of the parameter, the role appears also in the specifications tree under the User Feature reference and under each User Feature instances.

Warning
  1. During the creation step, you can use all the methods of this interface, but never modify object given by the following methods: GetReferenceComponents, GetListInputs, GetInput, GetInternalParameters, GetParameters, GetPreview
  2. After the creation step, you can only used the Get methods, but with the same restriction for the methods given just above.


Method Index


o AddComponents(CATPathElement*,CATListValCATBaseUnknown_var&,CATUnicodeString&)
Update the list of components with the user selection.
o AddParameter(CATBaseUnknown_var&)
Publishes a parameter.
o GetInput(int,CATBaseUnknown_var&)
Retrieves one input.
o GetInputRole(int,CATUnicodeString&)
Retrieves the role of one input.
o GetInputsNumber(int&)
Retrieves inputs count.
o GetInternalParameters(CATListValCATBaseUnknown_var*&)
Retrieves all available parameters.
o GetListInputs(CATListValCATBaseUnknown_var*&,CATListOfCATUnicodeString*&)
Retrieves all inputs and their role.
o GetParameterRole(CATBaseUnknown_var&,CATUnicodeString&)
Retrieves the role of one published parameter.
o GetParameters(CATListValCATBaseUnknown_var*&)
Retrieves all published parameters.
o GetPreview(CATPixelImage*&)
Retrieves the associated pixel image as preview.
o GetReferenceComponents()
Retrieves all referenced components.
o RemoveParameter(CATBaseUnknown_var&)
Un-Publishes a parameter.
o SetComponents(CATListValCATBaseUnknown_var*)
Sets a list of components.
o SetInputRole(int,CATUnicodeString&)
Modifies the role of one input.
o SetParameterRole(CATBaseUnknown_var&,CATUnicodeString&)
Modifies the role of one published parameter.
o SetPreview(CATPixelImage*)
Sets a pixel image as preview.
o VerifyComponents(CATListValCATBaseUnknown_var*,CATUnicodeString&)
Checks the validity of a list of components.

Methods


o AddComponents
public virtual HRESULT AddComponents( const CATPathElement* iSelection,
CATListValCATBaseUnknown_var& ioComponents,
CATUnicodeString& oMessage) = 0
Update the list of components with the user selection.
Role: This method enables to update the elements to add the the components list definition. It checks if the element canbe selected for the selection It's mainly used for interactive purpose.
Parameters:
iSelection
The selection of the user.
ioComponents
The components list that must be updated. This list is prefilled with the current components definition. Indeed an element can be added only if a another is already in the component list.
oMessage
NLS Message to explain why the element cannot be added.
An error is returned if the element cannot be selected
o AddParameter
public virtual HRESULT AddParameter( const CATBaseUnknown_var& iParamToPublish) = 0
Publishes a parameter.
Parameters:
iParamToPublish
This parameter should be in the list given by
GetInternalParameters.
o GetInput
public virtual HRESULT GetInput( const int iPos,
CATBaseUnknown_var& oInputValue) = 0
Retrieves one input.
Parameters:
iPos
input position, from 1 to
GetInputsNumber.
oInputValue
The iPos input.
o GetInputRole
public virtual HRESULT GetInputRole( const int iPos,
CATUnicodeString& oRole) = 0
Retrieves the role of one input.
Parameters:
iPos
input position, from 1 to
GetInputsNumber.
oRole
The role of the iPos input.
o GetInputsNumber
public virtual HRESULT GetInputsNumber(int& oInputCount) = 0
Retrieves inputs count.
Parameters:
oInputCount
Count of inputs.
o GetInternalParameters
public virtual HRESULT GetInternalParameters(CATListValCATBaseUnknown_var*& oParamList) = 0
Retrieves all available parameters.
Parameters:
oParamList
liste of available parameters
o GetListInputs
public virtual HRESULT GetListInputs(CATListValCATBaseUnknown_var*& oInputList,
CATListOfCATUnicodeString*& oInputRoleList) = 0
Retrieves all inputs and their role.
Parameters:
oInputList
List of all inputs.
oInputRoleList
list of the role of all inputs.
o GetParameterRole
public virtual HRESULT GetParameterRole( const CATBaseUnknown_var& iSpec,
CATUnicodeString& oRole) = 0
Retrieves the role of one published parameter.
Parameters:
iSpec
A published parameter. iSpec must be in the list returned by the
GetParameters method.
oRole
The role of the iSpec parameter
o GetParameters
public virtual HRESULT GetParameters(CATListValCATBaseUnknown_var*& oPublishedParamList) = 0
Retrieves all published parameters.
Parameters:
oPublishedParamList
List of published parameters.
A parameter is published thanks to the
AddParameter method.
This list is a sub-list of the list given by GetInternalParameters.
o GetPreview
public virtual HRESULT GetPreview(CATPixelImage*& oImage) = 0
Retrieves the associated pixel image as preview.
Parameters:
oImage
A pixel image with 130*110 size.
o GetReferenceComponents
public virtual CATLISTV(CATBaseUnknown_var)* GetReferenceComponents()= 0
Retrieves all referenced components.
Role:These features are the components selecting during de creation step.
Warning:The content of the list is not necessary the same as the list given to SetComponents, and the order can also be modified.
Returns:
List of components. The list is NULL while the SetComponents method is not called.
o RemoveParameter
public virtual HRESULT RemoveParameter( const CATBaseUnknown_var& iParamToUnpublish) = 0
Un-Publishes a parameter.
Parameters:
iParamToUnpublish
This parameter should be in the list given by
GetInternalParameters.
o SetComponents
public virtual HRESULT SetComponents(CATListValCATBaseUnknown_var* iListe) = 0
Sets a list of components.
Role: Define the content of the reference.
Warning You can call this method only once. see VerifyComponents
Parameters:
iListe
new list of feature to include in the Power Copy or User Feature reference
o SetInputRole
public virtual HRESULT SetInputRole( const int iPos,
const CATUnicodeString& iRole) = 0
Modifies the role of one input.
Parameters:
iPos
input position, from 1 to
GetInputsNumber.
iRole
The role of the iPos input.
o SetParameterRole
public virtual HRESULT SetParameterRole( const CATBaseUnknown_var& iSpec,
const CATUnicodeString& iRole) = 0
Modifies the role of one published parameter.
Parameters:
iSpec
A published parameter. iSpec must be in the list returned by the
GetParameters method.
iRole
The role of the iSpec parameter
o SetPreview
public virtual HRESULT SetPreview(CATPixelImage* iImage) = 0
Sets a pixel image as preview.
Role:This pixelimage will be embedded and used for preview in catalog. These catalog are .catalog files.
Parameters:
iImage
A pixel image with 130*110 size.
o VerifyComponents
public virtual HRESULT VerifyComponents( const CATListValCATBaseUnknown_var* iComponents,
CATUnicodeString& oMessage) = 0
Checks the validity of a list of components.
Role: This method verifies that the instantiation will be OK with these components. If the result is OK, you can call the SetComponents with the same list.
If you call this method after the SetComponents , iComponent is NULL, but if the result if KO, you must delete the reference and recreate an another one.
Parameters:
iComponents
List of components to check, if NULL, we take the components already selected.
oMessage
NLS Message to explain the fail.
An error is returned if you try to include a link to a sub element which is not in the selection, or if you try to include a feature without implementing Replace interfaces.

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

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