FindByName(Name: String): IStation;
Name is a workstation name.
The FindByName method returns a workstation from the collection by the specified name.
The method returns Null if the workstation with the specified name is not present in the local network.
Executing the example requires a form, a button named Button1 on this form.
Sub Button1OnClick(Sender: Object; Args: IEventArgs);
Var
MB: IMetabase;
Sec: IMetabaseSecurity;
m_User: IMetabaseUser;
St: IStations;
s: String;
Begin
MB := MetabaseClass.Active;
Sec := MB.Security;
m_User := Sec.ResolveName("ADMIN") As IMetabaseUser;
St := m_User.Stations;
If St.FindByName("1C") <> Null Then
s := "Workstation was found";
Else
s := "Workstation was not found";
End If;
End Sub Button1OnClick;
On clicking the button, the workstation with the 1C name is searched in the ADMIN user collection, the result is saved in the "s" variable.
See also: