All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

MecModInterfaces Interface CATIPartRequest

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

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


interface CATIPartRequest

Interface to retrieve the geometrical features sets of the Part document.
Role:With this interface and the CATIPrtPart interface, you have all the methods to manage the Part feature.
This interface enables you to retrieve the geometrical features sets aggregated directely or indirectly by the Part feature.

These geometrical features sets can be:


Refer to CATIMechanicalRootFactory interface for explanation about geometrical features sets creation rules.

All the methods of this interface need a context (It is a difference between the CATIDescendants interface). The context is the means to have for the same design several representations. There is a default context represented by the MfDefault3DView string value.

This interface is implemented on the Part feature that you retrieve by using the CATIPrtContainer.GetPart method on the specification container (see CATIContainerOfDocument )

See also:
CATIBodyRequest, CATIMechanicalRootFactory


Method Index


o GetAllBodies(CATUnicodeString&,CATListValCATBaseUnknown_var&)
Retrieves all root Bodies, all GS and all root OGS.
o GetDirectBodies(CATUnicodeString&,CATListValCATBaseUnknown_var&)
Retrieves all root geometrical feature sets (all root Bodies,all root OGS and all root GS).
o GetDirectBodiesChangeEvent()
Retrieves the event that is dispatched when the list of root geometrical feature sets change.
o GetMainBody(CATUnicodeString&,CATBaseUnknown_var&)
Retrieves the main Body.
o GetSolidBodies(CATUnicodeString&,CATListValCATBaseUnknown_var&)
Retrieves all root Bodies.
o GetSurfBodies(CATUnicodeString&,CATListValCATBaseUnknown_var&)
Retrieves all GS and all root OGS.

Methods


o GetAllBodies
public virtual HRESULT GetAllBodies( const CATUnicodeString& iViewContext,
CATListValCATBaseUnknown_var& oBodies)=0
Retrieves all root Bodies, all GS and all root OGS.
Parameters:
iViewContext
The context of view:
Legal values:
  • "MfUnfoldedView" or "Unfolded": for an unfolded view in Sheet Metal applications,
  • "MfDefault3DView": for the default 3D view,
  • otherwise: the default 3D view.
oBodies
The list = list of
GetSurfBodies + list of GetSolidBodies
o GetDirectBodies
public virtual HRESULT GetDirectBodies( const CATUnicodeString& iViewContext,
CATListValCATBaseUnknown_var& oBodies)=0
Retrieves all root geometrical feature sets (all root Bodies,all root OGS and all root GS).
Parameters:
iViewContext
The context of view:
Legal values:
  • "MfUnfoldedView" or "Unfolded": for an unfolded view in Sheet Metal applications,
  • "MfDefault3DView": for the default 3D view,
  • otherwise: the default 3D view.
oBodies
A list containing the root geometrical feature sets.
o GetDirectBodiesChangeEvent
public virtual CATCallbackEvent GetDirectBodiesChangeEvent()= 0
Retrieves the event that is dispatched when the list of root geometrical feature sets change.
Example:Here is an example of subscription the DirectBodiesChange event. pPartRequestonPart is a CATIPartRequest interface pointer on the Part feature and "this" is the object that wants to subscribe to the event.
 
CATBaseUnknown* pBUOnPart = NULL;
pPartRequestOnPart->QueryInterface(IID_CATBaseUnknown,(void**)&pBUOnPart);
...
::AddCallback(this,pBUOnPart,pPartRequestOnPart->GetDirectBodiesChangeEvent(),(CATSubscriberMethod)&MfClass::MyMethodCB)
...
Don't forget to unsubscribe.
o GetMainBody
public virtual HRESULT GetMainBody( const CATUnicodeString& iViewContext,
CATBaseUnknown_var& oPartBody)=0
Retrieves the main Body. The main Body is unique in a Part document. The default created Body after creation of a Part document is the main Body. It can be changed afterwards thanks to the "Change Part Body" command.
Parameters:
iViewContext
The context of view:
Legal values:
  • "MfUnfoldedView" or "Unfolded": for an unfolded view in Sheet Metal applications,
  • "MfDefault3DView": for the default 3D view,
  • otherwise: the default 3D view.
oPartBody
The Body which is the main Body.
o GetSolidBodies
public virtual HRESULT GetSolidBodies( const CATUnicodeString& iViewContext,
CATListValCATBaseUnknown_var& oBodies)=0
Retrieves all root Bodies.
Parameters:
iViewContext
The context of view:
Legal values:
  • "MfUnfoldedView" or "Unfolded": for an unfolded view in Sheet Metal applications,
  • "MfDefault3DView": for the default 3D view,
  • otherwise: the default 3D view.
oBodies
The list of root Bodies.
o GetSurfBodies
public virtual HRESULT GetSurfBodies( const CATUnicodeString& iViewContext,
CATListValCATBaseUnknown_var& oBodies)=0
Retrieves all GS and all root OGS.
Parameters:
iViewContext
The context of view:
Legal values:
  • "MfUnfoldedView" or "Unfolded": for an unfolded view in Sheet Metal applications,
  • "MfDefault3DView": for the default 3D view,
  • otherwise: the default 3D view.
oBodies
The list of all all GS and all root OGS features contained in the Part document.

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

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