caa在手机上用什么打开(cad用什么软件打开)

二次开发第一要义:查帮助

CAA打开文档函数的帮助如下:

OpenDocument

public static HRESULT OpenDocument(const CATUnicodeString&iStorageName,

CATDocument*&oOpenedDoc,CATBooleaniReadOnly=FALSE)

功能:打开一个给定的文档。

Role: If the file already exists in the session, it will not be re-loaded.

The document must be removed from the session before exiting or when it is no longer needed. See explanations at the top of this page about the life cycle of the document.

Note: This method does not allow opening .feat or .CATfct catalogs. It is not possible to access .feat catalogs because they contain Dassault Systemes private data. To open a .CATfct catalog, see CATCatalogFactoryServices (ObjectSpecsModeler framework).

Parameters:

iStorageName

The complete access name of the file to open ( path + name of the file ).

See CATDocument.StorageName for more information about the storage name.

oOpenedDoc

The opened document.

If the "open" is a "re-open", the pointer is not a new pointer. Do not remove the pointer twice.

iReadOnly

FALSE: Default value, the document will be in read/write mode.

TRUE: The document is in read only mode.

In case of a re-opening, the mode of the document is defined by the first open.

Returns:

S_OK : The document was opened sucessfully.

S_FALSE : The document has already been loaded. The returned oOpenedDoc pointer points to this document.

E_FAIL : The open operation failed.

怎么用呢,上代码:

CATSession *pSession = NULL;

HRESULT rc=NULL;

rc = ::Create_Session("CAA_PrdProp_Session", pSession);


// Opening an existing document with full path specified


CATDocument *pDoc =NULL;

CATUnicodeString strPath="C:\\Users\\weiwu-chen\\Desktop\\卷线器改\\juanxianqi.CATProduct";//juanxianqi.CATProduct";

rc = CATDocumentServices::OpenDocument(strPath, pDoc);

if (FAILED(rc)|| NULL==pDoc)

{

return;

}