RunBy methods - SmartPlant Foundation - IM Update 44 - Customization & Programming - Hexagon

SmartPlant Foundation Customization

Language
English
Product
SmartPlant Foundation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

There are several RunBy… methods, some of which overlap with the Get methods we've already used. The main difference is that the Get methods will search both the cache and the database while the RunBy… methods will search only the database. For instance, to retrieve an object by UID using the RunBy method:

Dim lobjVaults As IObjectDictionary = SPFRequestContext.Instance.QueryRequest.RunByUID("ISPFVault")

Dim lobjVault As IObject = lobjVaults(0)

There is no version of that method that returns a single object, so it is a bit more inconvenient.