NamingFormat: String;
The NamingFormat property determines format of a name of an attribute.
To set attribute type, use the ILanerCellAttribute.Type property.
Executing the example requires that the repository contains a workbook wit the WORKBOOK_SUFFIX identifier that contains several series. The attributes for forming of comments to series observations must also be set. This workbook must use the time series database that contains mandatory attribute of series with the INDICATOR identifier as a data source.
Add links to the Express, Laner and Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
WbkObj: IMetabaseObject;
EaxAn: IEaxAnalyzer;
Laner: ILaner;
CommentAttr: ILanerCellAttributes;
CellAttr: ILanerCellAttribute;
Begin
// Get workbook
mb := MetabaseClass.Active;
WbkObj := mb.ItemById("WORKBOOK_SUFFIX").Edit;
EaxAn := WbkObj As IEaxAnalyzer;
Laner := EaxAn.Laner;
// Get collection of comment attributes
CommentAttr := Laner.CommentAttributes;
// Get the first attribute from the collection
CellAttr := CommentAttr.Item(0);
// Change the attribute used for the comment
CellAttr.NamingFormat := "INDICATOR";
CellAttr.Type := LnAttributeType.Fact;
// Save changes
WbkObj.Save;
End Sub UserProc;
After executing the example the first attribute used for forming of comments to series observations is changed: comments are formed by value of the INDICATOR attribute.
See also: