System Projects Reference > Situational Awareness System Projects > Situational Awareness Include Project > Workspace_GetEquipmentCluster

Workspace_GetEquipmentCluster

Returns the given equipment string with its cluster prefix and caching it in the process. The function will attempt to automatically detect the cluster of the equipment in the following order:

  1. In a single cluster system, the cluster may be automatically resolved and require no further custom code.
  2. Get the cluster from the page cluster context.
  3. Check each configured cluster to see if the passed equipment exists.

If the cluster cannot be automatically detected, the original equipment string will be returned.

Syntax

Workspace_GetEquipmentCluster(STRING sEquipmentContext [, INT bRefreshCache])

sEquipmentContext

The equipment context to verify.

bRefreshCache

Force the function to ignore any cached value. This is an optional parameter. The default value is FALSE.

Return Value

The context will be returned with the cluster prefix. If the cluster cannot be automatically detected, the original equipment string will be returned.

Example

STRING sEquipmentNameWithCluster = WWorkspace_GetEquipmentCluster("MyPlant.Mixing.TNK01");

Result: Cluster1.MyPlant.Mixing.TNK01

Related Functions

Published June 2018