All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

CATxPDMInterfaces Class CATxPDMProductServices

CATxPDMProductServices
 

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


public class CATxPDMProductServices

Class for PDM services working on Part and Product items loaded in session.

All the methods pre-requisites the PX1 license

See also:
CATIxPDMProductItem, CATIxPDMPartItem


Method Index


o ChangeContext(CATIxPDMPartItem_var&,CATBaseUnknown_var&)
Changes Product context of a CATPart item.
o SetProductInstanceActivation(CATBaseUnknown_var&,CATBoolean,CATListValCATIxPDMItem_var*&,CATIReporter*&)
Activate or Deactivate a product instance with session impacts.

Methods


o ChangeContext
public static HRESULT ChangeContext( const CATIxPDMPartItem_var& iPartItemToChange,
const CATBaseUnknown_var& iNewContextInstance)
Changes Product context of a CATPart item.
Role:This method changes the product context of a CATPart item. This method works only for CATPart items with an existing context ( see CATIxPDMPartItem:HasExternalLinks ) This method works only if during context change, existing links can be rerouted to a new consistent context. Only one single context is allowed for a CATPart.
Parameters:
iPartItemToChange
The CATPart item with an old context to change.
iNewContextInstance
The new context instance. Be carefull, it should be an instance of iPartItemToChange in root context (not first level of instance).
Returns:
  • S_OK: The context successfully changed.
  • E_FAIL: The method has failed. The possible returned errors (listed by their identifier) are:
    • InputERR_1001:
    • The PX1 licence is not available.
    • InputERR_1005:
    • The PartItem should be loaded.
    • InputERR_1126:
    • The PartItem should have some contextual links.
    • InputERR_1127:
    • The new context instance is not valid.
o SetProductInstanceActivation
public static HRESULT SetProductInstanceActivation( const CATBaseUnknown_var& iInstanceToChange,
const CATBoolean iActivate,
CATListValCATIxPDMItem_var*& oItemsWithError,
CATIReporter*& oReporter)
Activate or Deactivate a product instance with session impacts.
Role:This method changes the product activation/deactivation status. In Root Product context of input instance, all geometrical import links will be inactivated at deactivation (activated at product activation). For Solid import, Boolean Operation using Body with import will also be deactivated (or activated). Import of deactivated body will also be deactivated (recursively).
Parameters:
iInstanceToChange
The product instance you want to activate or inactivate.
iActivate
TRUE to activate selected instance, FALSE to deactivate product instance.
oItemsWithError
List of items with associated errors or warning. Items can be duplicated in this list if there is several errors on one item.
oReporter
List of errors or warning on impacts managed. Use CATIReporter#GetListReporterInfo to retrieve all details. Authorized values are:
  • InputERR_1401:
  • An geometrical import has been automatically deactivated.
  • InputERR_1402:
  • An geometrical import has been automatically activated.
  • InputERR_1403:
  • A boolean operation has been automatically deactivated.
  • InputERR_1404:
  • A boolean operation has been automatically activated.
Returns:
  • S_OK: Activation/Deactivation successfully performed.
  • E_FAIL: The method has failed. The possible returned errors (listed by their identifier) are:
    • InputERR_1001:
    • The PX1 licence is not available.

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

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