IMetaAttributes.BuildFieldsByAttributes

Syntax

BuildFieldsByAttributes;

Description

The BuildFieldsByAttributes method creates table fields by definitions of time series database attributes.

Example

Executing the example requires a system dictionary with the DICT_AT identifier and a table with the OBJ_TABLE identifier.

Sub Main;

Var

Mb: Imetabase;

ObjMb: IMetabaseObject;

Dict: IMetaDictionary;

CrInfo: IMetabaseObjectCreateInfo;

Des: IMetabaseObjectDescriptor;

Attributes: IMetaAttributes;

Table: ITable;

Begin

Mb := MetabaseClass.Active;

Dict := Mb.ItemById("DICT_AT").Edit As IMetaDictionary;

Attributes := Dict.Attributes;

Table := Mb.ItemById("OBJ_TABLE").Edit As ITable;

Attributes.AttachTable(Table, False);

Attributes.BuildFieldsByAttributes;

(Table As IMetabaseObject).Save;

(Dict As IMetabaseObject).Save;

End Sub Main;

After executing the example a table is set to store values (OBJ_TABLE) for the DICT_AT object. Definitions of this table fields are created by object attributes.

See also:

IMetaAttributes