Add: IAuditFilterObject;
The Add method adds a new filter to the collection.
Executing the example requires the C:\Filter.xml file.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
FilCon: IAuditFiltersContainer;
Objs: IAuditFilterObjects;
Obj: IAuditFilterObject;
Begin
FilCon := New AuditFiltersContainer.Create;
FilCon.Load;
Objs := FilCon.Filters;
Obj := Objs.Add.Edit;
Obj.Description := "Filter description";
Obj.Save;
FilCon.SaveToFile("C:\Filter.xml");
End Sub UserProc;
After executing the example new filter is added to the objects collection. The container, that stores the collection is saved to the file C:\Filter.xml.
See also: