IMetabaseObjectHistoryItem.Station

Syntax

Station: String;

Station: string;

Description

The Station property returns a name of the workstation, on which the object was changed.

Example

Executing the example requires that the repository contains an object with the ObjTest identifier.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    Desc: IMetabaseObjectDescriptor;
    Histor: IMetabaseObjectHistory;
    Item: IMetabaseObjectHistoryItem;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    Desc := Mb.ItemById("ObjTest");
    Histor := Desc.GetHistory;
    For i := 0 To Histor.Count - 1 Do
        Item := Histor.Item(i);
        Debug.WriteLine(Item.Station + " " + Item.UserName + " " + DateTime.FromDouble(Item.Stamp).ToString);
    End For;
End Sub UserProc;
Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Desc: IMetabaseObjectDescriptor;
    Histor: IMetabaseObjectHistory;
    Item: IMetabaseObjectHistoryItem;
    i: Integer;
Begin
    MB := Params.Metabase;
    Desc := Mb.ItemById["ObjTest"];
    Histor := Desc.GetHistory();
    For i := 0 To Histor.Count - 1 Do
        Item := Histor.Item[i];
        System.Diagnostics.Debug.WriteLine(Item.Station + " " + Item.UserName + " " + DateTime.FromOADate(Item.Stamp).ToString());
    End For;
End Sub;

After executing the example information about the ObjTest object changing is displayed in the development environment console. PC name, repository user name, and date and time of objects changing are displayed.

See also:

IMetabaseObjectHistoryItem