System.Object
Eplan.EplApi.DataModel.AbstractDMObjectFilter
Eplan.EplApi.DataModel.PagesFilter
This class represents filter of Page and derived from it classes.
The PagesFilter can be accessed as a property of a Project object or can be used as a parameter for DMObjectsFinder.
Setting more than one criterion of matching the filter (for example Page.PageType and Page.Name), causes that returned pages must match both conditions.
System.Object
Eplan.EplApi.DataModel.AbstractDMObjectFilter
Eplan.EplApi.DataModel.PagesFilter
public class PagesFilter : AbstractDMObjectFilter
public ref class PagesFilter : public AbstractDMObjectFilter
Project proj; //a valid project DMObjectsFinder oFinder = new DMObjectsFinder(proj); PagesFilter oPagesFilter = new PagesFilter(); oPagesFilter.Name = @"=AP+ST1"; oPagesFilter.DocumentType = DocumentTypeManager.DocumentType.Frame; Page[] oPages = oFinder.GetPages(oPagesFilter); //now we have all pages with names starting with "=AP+ST1" and type with "DocumentType.Frame"
Project myProject = m_oProject; // A valid project Page myPage = myProject.Pages[0]; // A valid Page object // Define test property MultiLangString mlsTestValue = new MultiLangString(); mlsTestValue.AddString(ISOCode.Language.L_de_DE, "Test043c"); string strPropertyIdentyfingName = "Page.Test043c"; UserDefinedPropertyDefinition oUDPD = UserDefinedPropertyDefinition.Create(myProject, strPropertyIdentyfingName, UserDefinedPropertyDefinition.Enums.ClientType.Page); // Set test property on myPage myPage.Properties[strPropertyIdentyfingName] = mlsTestValue; // Search page with property value DMObjectsFinder objFinder = new DMObjectsFinder(myProject); PagesFilter pagesFilter = new PagesFilter(); PagePropertyList pagePropertyList = new PagePropertyList(); AnyPropertyId anyPropertyId = new AnyPropertyId(myProject, strPropertyIdentyfingName); pagePropertyList[anyPropertyId] = mlsTestValue; pagesFilter.SetFilteredPropertyList(pagePropertyList); Page[] arrPages1 = objFinder.GetPages(pagesFilter);
Name | Description | |
---|---|---|
PagesFilter Constructor | Overloaded. |
Name | Description | |
---|---|---|
DocumentType | Returns the Page.PageType that was set to this filter. | |
ExactNameMatching | Gets if the filtered function, when is filtered by name, should be matched exactly, it means that if searched name is only its name' prefix, it is not matching to the filter. | |
Name | Returns the name that was set to this filter. |
Name | Description | |
---|---|---|
Dispose() | Destructor for deterministic finalization of PagesFilter object. (Inherited from Eplan.EplApi.DataModel.AbstractDMObjectFilter) | |
ResetFilter | Overridden. Resets the filter. Filter matches all Pages then. | |
SetFilteredPropertyList | Sets the PagePropertyList that Pages matching the filter must have. |