Object: Store
- Updated2024-09-12
- 1 minute(s) read
(General | Objects) > DataPlugin > Object: Store
Object: Store
The Store object provides information on the data store currently processed by the DataPlugin. Use the Store object properties to specify how to map the information about a data model, for example, ATFX files, onto the TDM data model. You also can use the Store object to change, to rename, or to extend information about a TDM data model.
If you select the file reader DataPlugin when you create a new DataPlugin, you specify that the DataPlugin to be created is a DataPlugin that can map. The ReadStore procedure receives the Store object with a reference to the data store to be loaded, via the FromStore parameter. Within the new DataPlugin you specify how information is read from the USI data store and is mapped to the TDM data model.
The following example transfers the information in the FromStore object about channel groups and about channels, into the structure of the TDM data model:
Sub ReadStore(FromStore) Call FindAndCreateGroups(FromStore.Children) End Sub Sub FindAndCreateGroups(StoreElements) Dim StoreElement Dim TDMGroup For Each StoreElement in StoreElements If StoreElement.IsKindOf(eStoreChannelGroup) Then Set TDMGroup = Root.ChannelGroups.Add(StoreElement.Name) Call TDMGroup.Properties.AddProperties(StoreElement.Properties) Call CreateChannels(StoreElement, TDMGroup) Else Call FindAndCreateGroups(StoreElement.Children) End If Next End Sub Sub CreateChannels(StoreGroup, TDMGroup) Dim StoreChannel For Each StoreChannel In StoreGroup.Channels Call TDMGroup.Channels.AddStoreChannel(StoreChannel) Next End Sub
Properties
Children | ConfigFileName | FileInfo | Parameters | PluginName