iCAx开思网

标题: CAA: 怎样对catia自己的feature添加extension? [打印本页]

作者: cupcake    时间: 2007-3-30 15:35
标题: CAA: 怎样对catia自己的feature添加extension?
各位高手:
        最近看了use case里面讲feature extension时候提到了给用户自定feature 添加extension,现在我想给已有feature添加extension,请问应该怎么做?
作者: acoka    时间: 2007-3-30 17:09
CATIOsmExtendable::AddExtension()
作者: cupcake    时间: 2007-3-30 17:27
acoka兄,找遍了help viewer以及头文件,没发现CATIOsmExtendable呢。我用的是r14。
作者: acoka    时间: 2007-4-2 09:10
哦,R17开始只能用Osm了
R16之前可以用

ObjectSpecsModeler Interface CATIExtendable
System.IUnknown
  |
  +--System.IDispatch
    |
    +--System.CATBaseUnknown
      |
      +--CATIExtendable

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


--------------------------------------------------------------------------------

interface CATIExtendable




Deprecated:
V5R15 CATIOsmExtendable Interface dedicated to the extension of spec objects.


--------------------------------------------------------------------------------

Method Index


o ActivateExtension(char*,char*,CATBoolean)
o DeactivateExtension(char*,char*,CATBoolean)
o IsExtensionActive(char*,char*)
o QueryAllExtensions(IID&,CATListPtrCATBaseUnknown**,char*)
o ReactivateExtension(char*,char*)
Methods


o ActivateExtension
public virtual HRESULT ActivateExtension( const char*  iExtensionName,
const char*  iApplicationId,
CATBoolean  iCreateIfNecessary =FALSE )=0  

Deprecated:
V5R15 CATIOsmExtendable#AddExtension Activates the extension.Role: an extension can be activated without necessarily actually existing in the applicative container. When using CATIOsmExtendable interface, activated/deactivated state is deprecated, extensions are seen as always active, so CATIOsmExtendable#AddExtension should be called only at creation of the extension on the base feature.
Parameters:
iExtensionName
the name of the extension to be activated
iApplicationId
the applicative container containing the extension to be activated
iCreateIfNecessary
TRUE - the extension is instantiated in the applicative container if it does not already exist
FALSE - the extension is not instantiated in the applicative container even if it does not already exist
Returns:
S_OK if succeeded
S_FALSE if creation requested but not needed
o DeactivateExtension
public virtual HRESULT DeactivateExtension( const char*  iExtensionName,
const char*  iApplicationId,
CATBoolean  iDestroyIfNecessary =FALSE)=0  

Deprecated:
V5R15 CATIOsmExtendable#RemoveExtension Deactivates the extension. Role: an extension can be deactivated without necessarily actually being removed from the applicative container. When using CATIOsmExtendable interface, activated/deactivated state is deprecated, extensions are seen as always active, so this method has its equivalent RemoveExtension on CATIOsmExtendable only if it is used with iDestroyIfNecessary=TRUE, else it is useless.
Parameters:
extensionName
the name of the extension to be deactivated
iApplicationId
the name of the applicative container containing the extension to be deactivated
iDestroyIfNecessary
TRUE = if the extension exists, it is removed
FALSE = even if the extension exists, it is not removed
o IsExtensionActive
public virtual HRESULT IsExtensionActive( const char*  iExtensionName,
const char*  iApplicationId =NULL )=0  

Deprecated:
V5R15 NoReplacement Tests if the extension is active, not active or does not exist at all. When using CATIOsmExtendable interface, activated/deactivated state is deprecated, extensions are seen as always active, so this method has no equivalent on CATIOsmExtendable.
Parameters:
iExtensionName
the name of the extension
iApplicationId
the name of the applicative container
Returns:
S_OK if the extension is active
S_FALSE if the extension exists but is inactive
E_FAIL if the extension does not exist at all
o QueryAllExtensions
public virtual HRESULT QueryAllExtensions( const IID&  iIID,
CATListPtrCATBaseUnknown**  oLst,
const char*  iApplicationId =NULL )= 0  

Deprecated:
V5R15 CATIOsmExtendable#QueryAllExtensions Returns all the active extensions implementing the requested interface in the requested applicative container.
Parameters:
IID
the requested interface
oLst
the list of all the active extensions implementing the requested interface in the requested applicative container, if any. The list is in activation reverse order (last activated first).
iApplicationId
the name of the applicative container. If NULL, returns all the active extensions, regardless of the applicative container.
o ReactivateExtension
public virtual HRESULT ReactivateExtension( const char*  iWeakType,
const char*  iApplicationId)=0  

Deprecated:
V5R15 NoReplacement Reactivates the extension.Role: An extension can be activated by invoking its supertype. When using CATIOsmExtendable interface, activated/deactivated state is deprecated, extensions are seen as always active, so this method has no equivalent on CATIOsmExtendable.
Parameters:
iWeakType
the type or supertype of the extension to be activated
iApplicationId
the applicative container containing the extension to be activated
Returns:
S_OK if succeeded


--------------------------------------------------------------------------------
This object is included in the file: CATIExtendable.h
If needed, your Imakefile.mk should include the module: CATObjectSpecsModeler
--------------------------------------------------------------------------------

Copyright © 2003, Dassault Systèmes. All rights reserved.
作者: cupcake    时间: 2007-4-2 11:12
CATIExtendable这个接口已经找到了,请问我应该怎样给catia已有的feature添加extension?和给自定义的feature添加方法一样吗?




欢迎光临 iCAx开思网 (https://www.icax.org/) Powered by Discuz! X3.3