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.

Add links to the Metabase, Rds, Db system assemblies.

Sub UserProc;
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 UserProc;

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

See also:

IMetaAttributes