Eplan Platform API
Eplan.EplApi.DataModel Namespace / PagesFilter Class
Members Example

In This Topic
    PagesFilter Class
    In This Topic

    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.

    Inheritance Hierarchy

    System.Object
       Eplan.EplApi.DataModel.AbstractDMObjectFilter
          Eplan.EplApi.DataModel.PagesFilter

    Syntax
    public class PagesFilter : AbstractDMObjectFilter 
    public ref class PagesFilter : public AbstractDMObjectFilter 
    Example
    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"
    The following example shows how to filter by user-defined properties
    MultiLangString mlsTestValue = new MultiLangString();
    mlsTestValue.AddString(ISOCode.Language.L_de_DE, "Test043c");
    string strPropertyIdentyfingName = "Page.Test043c";
    UserDefinedPropertyDefinition oUDPD = UserDefinedPropertyDefinition.Create(m_oProject, strPropertyIdentyfingName, UserDefinedPropertyDefinition.Enums.ClientType.Page);
    
    //set test property
    Page oPage = m_oProject.Pages[0];
    oPage.Properties[strPropertyIdentyfingName] = mlsTestValue;
    
    //search page with property value
    DMObjectsFinder oFinder = new DMObjectsFinder(m_oProject);
    PagesFilter oPagesFilter = new PagesFilter();
    PagePropertyList oPagePropertyList = new PagePropertyList();
    AnyPropertyId oAnyPropertyId = new AnyPropertyId(m_oProject, strPropertyIdentyfingName);
    oPagePropertyList[oAnyPropertyId] = mlsTestValue;
    oPagesFilter.SetFilteredPropertyList(oPagePropertyList);
    Page[] arrPages1 = oFinder.GetPages(oPagesFilter);
    
    
    Public Constructors
     NameDescription
    Public ConstructorOverloaded.   
    Top
    Public Properties
     NameDescription
    Public PropertyReturns the Page.PageType that was set to this filter.  
    Public PropertyGets 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.  
    Public PropertyReturns the name that was set to this filter.  
    Top
    Public Methods
     NameDescription
    Public MethodDestructor for deterministic finalization of PagesFilter object. (Inherited from Eplan.EplApi.DataModel.AbstractDMObjectFilter)
    Public MethodOverridden. Resets the filter. Filter matches all Pages then.  
    Public MethodSets the PagePropertyList that Pages matching the filter must have.  
    Top
    See Also