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

PlacementsFilter Class
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 
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
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 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 Placements then.  
Public MethodOverloaded. Sets the PlacementPropertyList that Placements matching the filter must have.  
Top
See Also