ExportUsersList(FileName: String);
ExportUsersList(System.String);
FileName. Name and location of the file to which the object is exported.
NOTE. To export file as a table, specify file in CSV-format (*.csv).
The ExportUsersList method exports user list to the file.
The files saves only information displayed in list of security manager that is why configured column display and filtering in used must be taken into account.
To execute the example, add links to the Metabase, ForeSystem (for the Fore.NET example) system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
// Export list of users to the file
MB.Security.ExportUsersList("C:\UsersList.csv");
// Check in license
Lic := Null;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.ForeSystem;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Lic: Object;
Begin
MB := Params.Metabase;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
// Export list of users to the file
MB.Security.ExportUsersList("C:\_UsersList.csv");
// Check in license
Lic := Null;
End Sub;
After executing the example the list of users will be exported as a table to the specified file.
See also: