SupportsFeature As Boolean - 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)

Description

EFCommonUI calls this method when it needs to check with a tool if a feature is supported or not. There are two arguments in this method. The first argument for this method is of type ToolFeatures. ToolFeatures is an enumeration defined in SchemaComponent.tlb as defined below.

typedef []

enum {

ToolRevisions = 1,

Mapping = 2,

FindToPublish = 3,

BatchPublish = 4,

BatchRetrieve = 5,

RetrieveViewFile = 6,

NoConfigurationManagement = 7,

NoCorrelationInTool = 8,

SPFRevisions = 9,

ToolBatchPublish = 10

MultiToolPlantsToOnePlant = 11

NoMinorRevisions = 12

} ToolFeatures;

The ToolRevisions entry is used to check if the tool supports revisions. When the SupportsFeature method is called with this entry, the tool adapter should return TRUE if the tool supports revisions.

The Mapping entry is used to check if the tool uses the mapping schema in publish operations. When the SupportsFeature method is called with this entry, the tool adapter should return TRUE if the tool supports mapping schema.

The BatchPublish entry is used to check if the tool supports publish operations in batch mode.

The BatchRetrieve entry is used to check if the tool supports retrieve operation in batch mode.

The FindToPublish entry is used to check if the tool supports Documents to Publish functionality. A tool can support this functionality by keeping a record of what documents have been published by saving the last publish date and when the documents have been modified last.

If a tool supports this functionality, then when user clicks Find Documents to Publish, EFServiceManager will call the FindDocsToPublish method on the tool adapter to get a list of documents to publish. If the tool does not support the functionality, EFServiceManager will execute its logic to get the list.

The RetrieveViewFile entry is used to check if the tool supports retrieving (or needs to retrieve) the view file as part of retrieve operation. There is a second optional argument in the SupportsFeature method, called sDocTypeUID. This argument is used with the RetrieveViewFile enumeration entry to let the adapter know the document type for which the check is being done. During a retrieve operation, EFServiceManager makes the SupportsFeature call to the adapter to check if it needs the view file of the document in the retrieve operation. If the answer is TRUE, EFServiceManager will fetch the view files from EDR and make them available to the tool on the client.

The NoConfigurationManagement entry is used to determine if the tool supports plant/project configuration similar to SmartPlant Foundation plant/project configuration. If the tool does not support plant/project configuration, then the EFCommonUI will allow registration to either a plant or a project depending on where the tool documents will be published and from where the documents will be retrieved. Currently all tools support plant/project configuration and hence return FALSE for this entry.

The NoCorrelationInTool entry is used to determine if the object correlation needs to be done in SmartPlant Foundation or not. The object correlation is a way to say that a published object is the same as the object published by another tool. Most of the tools have the ability to correlate objects with other tools’ objects in their environment. Some tools such as PDS do not have correlation capability, as they do not retrieve documents. Thus, the PDS Adapter will return TRUE for this entry, which tells SmartPlant Foundation to generate correlations between PDS objects and other tool objects using name as the matching criteria.

The SPFRevisions entry is used to check whether the tool supports the Revise command and uses the SmartPlant Foundation revisioning scheme. A tool that depends on SmartPlant Foundation for revisioning would have to implement the IEFAdapter3 interface and will have to call the revise methods described later.

The ToolBatchPublish entry is added for Smart 3D drawings publish. This entry is used to check whether a tool can support batch publish where the EFCommonUI would return the document selections made in the Publish dialog back to the tool adapter for later publish using IEFCommonUIApplication2 interface. The Publish dialog will show an option for tool batch publish. When this option is selected, the EFCommonUI will send the user selections to the tool adapter using IEFAdatpter5 interface instead of continuing with normal publish process. The tool will save the user selections for later publish using IEFCommonUIApplication2 interface. A tool that supports batch publish will have to implement IEFAdapter5 interface.

The MultiToolPlantsToOnePlant entry is used to check if the tool supports integrating two or more tool plants with one SmartPlant Foundation plant. The tool adapter will set this entry to TRUE so that the EFCommonUI’s Register dialog will allow registering more than one tool plant with one SmartPlant Foundation plant. Tools should make this entry TRUE only when it is capable of publishing and retrieving documents from multiple tool plants to a single SmartPlant Foundation plant.

The NoMinorRevisions entry is used to check if the tool supports minor revisions. When the SupportsFeature method is called with this entry, the tool adapter should return TRUE if the tool does not support minor revisions.

A tool will implement the SupportsFeature method to return TRUE for a feature that it supports; otherwise it returns FALSE.

Tool implementation will not have to change when new features are added to enumeration because it would return FALSE for unsupported features anyway, unless it needs to support that feature.

Example Code in Tool Implementation

Private Function IEFAdapter_SupportsFeature(ByVal Feature As IEFAdapter.ToolFeatures, Optional sDocTypeUID as String) As Boolean

Select Case Feature

Case Revisions

IEFAdapter_SupportsFeature = True

Case Else

IEFAdapter_SupportsFeature = False

End Select

End Function

Example Code in EFCommonUI

Dim bSupportsRevisions as Boolean

bSupportsRevisions = ToolAdapter.SupportsFeatures (Revisions)

Arguments

Name

Data type

Input/output

Description

Feature

ToolFeatures

Input

Feature for which the support is checked.

SDocTypeUID

String (maximum 128 characters)

Input

UID of Document type. Optional. Used only when this method is called with a value of RetrieveViewFile in the Feature argument.

Return Value

TRUE, if the tool supports the feature.

FALSE, if the tool does not support the feature.