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

SmartPlant Integration .NET 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, for example, SmartPlant Foundation plant, is the same as what is passed in the Connect call.

Each object in the returned 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 (optional) DocSubType properties.

The returned oDocumentsMetaData container has one document 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 this method, the calling application needs to build the criteria for the query using the oQueryParams argument. The oQueryParams is of ISPQueryParameters type. (See ISPQueryParameter Implemented by SPQueryParameter and ISPQueryParameters Implemented by SPQueryParameters, Which Inherits Generic.Dictionary for more information.)

Currently, the only query criterion supported is DocType. The calling application should add an ISPQueryParameter argument to the oQueryParams object. The IEFQueryParameter has two properties, Name (for name of the parameter) and Value (for value of the parameter). The Name should be equal to ‘DocType’ and the Value 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

ISPQueryParameters

Input

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

oDocuments

SchemaCompInterfaces.IContainer

Output

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

oDocumentsMetaData

SchemaCompInterfaces.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.