UnitIsRequired: Boolean;
UnitIsRequired: boolean;
The UnitIsRequired property determines whether the unique key of the time series database contains a units dictionary.
Available values:
True. Units dictionary is included into the unique key. When the time series database is saved, the following parameters are set to the Measurement Units attribute: Hidden = False, Nullable = False, InDefaultHierarchy = True.
False. Default value. Units dictionary is not included into the unique key.
Executing the example requires that the repository contains a time series database with the FC identifier and an MDM repository with the MDM_REPO identifier.
Add links to the Metabase, Cubes, Rds system assemblies.
Sub UserProc;
Var
mb: IMetabase;
Inf: IMetabaseObjectCreateInfo;
Obj: IMetabaseObjectDescriptor;
Rub: IRubricator;
Begin
mb := MetabaseClass.Active;
Inf := Mb.CreateCreateInfo;
Inf.ClassId := MetabaseObjectClass.KE_CLASS_RUBRICATOR;
Inf.Parent := mb.Root;
Inf.KeepEdit := True;
Obj := Mb.CreateObject(Inf);
Rub := (Obj As IRubricator);
Rub.Database := Mb.ItemById("RDS_REPO").Bind As IRdsDatabase;
Rub.UnitIsRequired := True;
Rub.AlterAndSave;
End Sub UserProc;
After executing the example a time series database is created in the repository root. The unique key of this time series database includes a units dictionary.
See also: