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

In This Topic
    PlacementsFilter Class
    In This Topic
    This class represents filter for Placements objects.

    The PlacementsFilter can be accessed as a property of a Page object or can be used as a parameter for DMObjectsFinder.

    Inheritance Hierarchy
    Syntax
    public class PlacementsFilter : StorableObjectsFilter 
    public ref class PlacementsFilter : public StorableObjectsFilter 
    Example
    DMObjectsFinder oFinder = new DMObjectsFinder(m_oTestProject);
    PlacementsFilter oFilter = new PlacementsFilter();
    oFilter.Page = m_oTestProject.Pages[10];
    Placement[] oP = oFinder.GetPlacements(oFilter);
    
    
    The following example shows how to filter by user-defined properties
    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);
    
    
    
    Public Constructors
     NameDescription
    Public ConstructorOverloaded.   
    Top
    Public Properties
     NameDescription
    Public PropertyOverridden. Sets the Page that StorableObjects matching the filter must be placed on.  
    Top
    Public Methods
     NameDescription
    Public MethodDestructor (Inherited from Eplan.EplApi.DataModel.AbstractDMObjectFilter)
    Public MethodOverridden. Resets the filter. Filter matches all StorableObjects then.  
    Public MethodOverloaded. Sets the PlacementPropertyList that Placements matching the filter must have.  
    Top
    See Also