Predefined: Boolean;
The Predefined property returns whether the attribute is a system one. The property returns True if an attribute is a system one, and False if an attribute is custom.
This property can return incorrect result for old versions of system dictionaries of time series database. It is necessary to call the IRubricator.AlterAndSave method to receive correct data before using the Predefined property.
Executing the example requires a time series database with the OBJ_FC identifier in the repository.
Sub Main;
Var
MB: IMetabase;
RubDesc: IMetabaseObjectDescriptor;
Rubr: IRubricator;
Attributes: IMetaAttributes;
Attr: IMetaAttribute;
i: Integer;
Begin
MB := MetabaseClass.Active;
RubDesc := MB.ItemById("OBJ_FC");
Rubr := RubDesc.Bind As IRubricator;
Attributes := Rubr.Facts.Attributes;
For i := 0 To Attributes.Count - 1 Do
Attr := Attributes.Item(i);
If Attr.Predefined Then
Debug.WriteLine(Attribute ' + Attr.Name + ' is system);
Else
Debug.WriteLine(Attribute ' + Attr.Name + ' is custom);
End If;
End For;
End Sub Main;
After executing the example, the console window displays information on the attributes of the database time series.
See also: