AllStations: IStations;
AllStations: Prognoz.Platform.Interop.Metabase.IStations;
The AllStations property returns the collection of workstations in the network in which working with the platform will be performed.
To execute the example, add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
Stat: IStations;
St: IStation;
Begin
MB := MetabaseClass.Active;
MS := MB.Security;
// Get list of workstations
Stat := MS.AllStations;
Stat.Refresh;
Debug.WriteLine("List of workstations: ");
For Each St In Stat Do
Debug.WriteLine(St.Name + " " + St.FullName);
End For;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Metabase;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MS: IMetabaseSecurity;
Stat: IStations;
St: IStation;
Begin
MB := Params.Metabase;
MS := MB.Security;
// Get list of workstations
Stat := MS.AllStations;
Stat.Refresh();
System.Diagnostics.Debug.WriteLine("List of workstations: ");
For Each St In Stat Do
System.Diagnostics.Debug.WriteLine(St.Name + " " + St.FullName);
End For;
End Sub;
After executing the example, the console will display a list of all workstations included to the network. For those workstations, the access can be limited fully or partially for particular users in the future.
See also: