IMetaAttributeNaming.MnemoPrefix

Syntax

MnemoPrefix: String;

Description

The MnemoPrefix property determines mnemonic prefix.

Comments

The IMetaDictionary.AttributeMnemoNamings property returns a collection of attributes names that form the mnemonic.

Example

Executing the example requires that the repository contains a time series database with the FC_MN identifier.

Sub Main;

Var

DicEdit: IMetaDictionary;

Nams: IMetaAttributeNamings;

Nam: IMetaAttributeNaming;

Ni, Nc: Integer;

Atrs: IMetaAttributes;

Atr: IMetaAttribute;

Dims: ICubeModelDimensionsEx;

Dim: ICubeModelDimensionEx;

Di, Dc: Integer;

Rubricator: IRubricator;

Mb: IMetabase;

RubI: IRubricatorInstance;

Rev: IRubricatorRevision;

FactorKeys: Array Of Integer;

FactsLookup: IRubricatorFactsLookup;

Begin

Mb := MetabaseClass.Active;

Rubricator := Mb.ItemById("FC_MN").Edit As IRubricator;

DicEdit := Rubricator.EditFacts;

Nams := DicEdit.AttributeMnemoNamings;

Atrs := DicEdit.Attributes;

Dims := Rubricator.Dimensions;

// Clear a collection of names

Nc := Nams.Count - 1;

For Ni := Nc To 0 Step - 1 Do

Nam := Nams.Item(Ni);

Nams.Remove(Nam);

End For;

// Set suffix and prefix of mnemonics

Dc := Dims.Count - 1;

For Di := 0 To Dc Do

Dim := Dims.Item(Di);

Atr := Atrs.FindByValuesObject(Dim.DimensionO.Key);

If Atr <> Null Then

Nam := Nams.Add(Atr);

nam.MnemoPrefix := "(";

nam.MnemoSuffix := ")";

nam.NamingFormat := "NAME";

End If;

End For;

// Save changes

(DicEdit As IMetabaseObject).Save;

// Generate catalog mnemonics

RubI := (Rubricator As IMetabaseObject).Open(Null) As IRubricatorInstance;

Rev := RubI.OpenRevision(Revision);

FactsLookup := RubI.CreateFactsLookup;

FactorKeys := FactsLookup.LookupFactors;

RubI.RegenerateMnemo(FactorKeys);

End Sub Main;

After executing the example, the (")" character) suffix and the ("("character) prefix of mnemonic are set for time series database. Then mnemonics are generated with new rules.

See also:

IMetaAttributeNaming