PLMDocumentInterfaces PLMDocumentServices

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


public class PLMDocumentServices

Class providing static methods to manipulate Documents.
You cannot use it in a RACE environment.


Method Index


o AttachDocument(CATIPLMComponent*,CATIAdpPLMIdentificator*)
Attach a document to an existing object.
o CreateDocument(CATIType_var&,CATListValCATICkeParm_var&,CATListValCATUnicodeString&,CATListValCATUnicodeString&,PLMIDocument*&)
Create a new Document.
o DetachDocument(CATIPLMComponent*,CATIAdpPLMIdentificator*)
Detach a document to an existing object.
o GetAttributeNamesAndValues(CATIAdpPLMIdentificator*,CATListValCATString&,CATListValCATUnicodeString&)
Retrieves attribute names and values of a given object from its Adp Id.
o GetDocument(CATIAdpPLMIdentificator*,PLMIDocument*&)
Gets Document either from database, or from session.
o ListDocuments(CATIPLMComponent*,CATListPtrCATIAdpPLMIdentificator&)
Retrieves the list of documents attached to a given object.

Methods


o AttachDocument
public static AttachDocument( iObject,
iDocumentIdentifier)
Attach a document to an existing object.
Role:This method attach an existing document to the specified object. If document is already attached an error will be returned. If object does not support document attachment an error will be returned.
Parameters:
iObject
[in] The object component on which document will be attached(component must be loaded with connections).
iDocumentIdentifier
[in] The document identifier to attach.
Returns:
  • S_OK if the operation was successfull.
  • E_INVALIDARG one of the inputs does not exist.
  • E_FAIL if an error occurs. In this case, more information can be retrieved using the CATError::CATGetLastError method.@see CATError. The possible returned errors are:
    • DD_ATTACH_NOTSUPPORTED : Object does not support document attachment.
    • DD_ATTACH_EXIST : Document already attached.
    • DD_DOESNOT_EXIST : Document does not exist.
    • DD_ERROR_CONDITION : Error occured during the operation.
o CreateDocument
public static CreateDocument( iType,
iAttrList,
const iFilePaths,
const iFileComments,
oDocument)
Create a new Document.
Parameters:
iType
Document type to be created.
iAttrList
All Public writable document attributes. This list must contain at least all mandatory attributes and one of the Identifier Set.
iFilePaths
The full paths from which the files will be uploaded.
iFileComments
Comments associated with the files (optional).
oDocument
The created Document. This object will need to be put into a bag
for correct lifecycle management.
Returns:
  • S_OK if the Document was successfully created.
  • E_FAIL otherwise.
o DetachDocument
public static DetachDocument( iObject,
iDocumentIdentifier)
Detach a document to an existing object.
Role:This method detach a document from the specified object. If document is not attached an error will be returned.
Parameters:
iObject
[in] The object component from which document will be detached(component must be loaded with connections).
iDocumentIdentifier
[in] The document identifier to detach.
Returns:
  • S_OK if the operation was successfull.
  • E_INVALIDARG one of the inputs does not exist.
  • E_FAIL if an error occurs. In this case, more information can be retrieved using the CATError::CATGetLastError method.@see CATError. The possible returned errors are:
    • DD_ATTACH_DOESNOTEXIST : Document is not attached.
o GetAttributeNamesAndValues
public static GetAttributeNamesAndValues( iObjAdpId,
oAttrNameList,
oAttrValueList)
Retrieves attribute names and values of a given object from its Adp Id.
Parameters:
*iObjAdpId
CATIAdpPLMIdentificator of the object of which the attributes are to be listed.
&oAttrNameList
List of attribute names.
&oAttrValueList
List of attribute values.
Returns:
S_OK
E_FAIL
o GetDocument
public static GetDocument( iDocumentIdentifier,
oDocument)
Gets Document either from database, or from session.
Parameters:
iDocumentIdentifier
The identifier of Document to open or to fetch.
oDocument
The returned Document. This object will need to be put into a bag
for correct lifecycle management.
Returns:
  • S_OK if the Document was successfully opened.
  • E_FAIL otherwise.
o ListDocuments
public static ListDocuments( iObject,
oDocumentIdentifiers)
Retrieves the list of documents attached to a given object.
Parameters:
iObject
[in] The object component from which document will be detached(component must be loaded with connections).
oDocumentIdentifiers
[out] The list of documents identifiers.
Returns:
  • S_OK if the operation was successfull,
  • E_INVALIDARG input does not exist.
  • E_FAIL if an error occurs. In this case, more information can be retrieved using the CATError::CATGetLastError method.@see CATError. The possible returned errors are:
    • DD_ATTACH_NODOC : No document is attached to the parent object.

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

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.