IStyleContainer.Key

Syntax

Key: Integer;

Description

The Key property returns the key of the style container.

Example

Executing the example requires that the repository contains a styles table with the Global_Style identifier.

Add links to the Drawing and Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    StyleSheet: IStyleSheet;
    Style: IStyleContainer;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("Global_Style").Edit;
    StyleSheet := MObj As IStyleSheet;
    Style := StyleSheet.Add;
    Debug.WriteLine(Style.Key);
    MObj.Save;
End Sub UserProc;

After executing the example a new style container is added to the styles table. The development environment console displays the key of the created style container.

See also:

IStyleContainer