QueryDocuments As Long - Integration - Update 44 - Help - Hexagon

SmartPlant Integration COM Help

Language
English
Product
Integration
Search by Category
Help
SmartPlant Foundation / SDx Version
10
Smart P&ID Version
9 (2019)
Smart Engineering Manager Version
10 (2019)

This method is the second of three called to query documents from SmartPlant Foundation.

This method returns document objects based on the criteria passed in the oQueryParams argument. The context of the documents returned is the same as what (plant/project) is passed in the Connect call.

Each object in the oDocuments container is of Document classdef and has IObject and IDocument interfaces. The IObject interface has UID, Name, and Description properties. The IDocument interface has DocCategory, DocTitle, DocType, and DocSubType (optional) properties.

The oDocumentsMetaData container has document version objects, one version object for each document in the oDocuments container. The document version object is of DocumentVersion classdef and has IObject and IDocumentVersion interfaces. The IDocumentVersion interface exposes a number of properties, and the following three are used by this method: DocRevision, DocVersion, and DocVersionDate. A version object is related to a document object in the oDocuments container by a VersionedDoc relationship.

Before calling the method, the calling application needs to build the criteria for the query using the oQueryParams argument. The oQueryParams is of IEFQueryParameters type. (See IEFQueryParameter Interface and IEFQueryParameters Interface for more information.)

Currently, the only query criterion supported is DocType. The calling application should add an IEFQueryParameter argument to the oQueryParams object. The IEFQueryParameter has two properties, namely sName (for name of the parameter) and vValue (for value of the parameter). The sName should be equal to ‘DocType’ and the vValue should be equal to a document type value supported by the SmartPlant Foundation. The document type value must be equal to a valid document type name in the SmartPlant Schema.

Arguments

Name

Data type

Input/output

Description

oQueryParams

IEFQueryParameters

Input

Collection of query parameters for document search in SmartPlant Foundation. Currently only the ‘DocType’ parameter is supported.

oDocuments

IContainer

Output

IContainer pointer to container containing document objects that are returned from SmartPlant Foundation.

oDocumentsMetaData

IContainer

Output

IContainer pointer to the meta-data container containing document version objects that correspond to the document objects in the oDocuments container.

Return Value

0 if the method is successful.

A negative number if the method fails. (Check LastErrorMessage property for error message)

Comments

None.