Eplan Platform API
Eplan.EplApi.DataModel Namespace / ICustomFilter Interface
Members Example

ICustomFilter Interface
This is an interface that can be used for user-defined filtering in DMObjectsFinder. User has to implement "IsMatching" method by himself.
Syntax
public interface ICustomFilter 
Example
class MyFilter : ICustomFilter
{
	public bool IsMatching(StorableObject obj)
	{
		Function f = obj as Function;
		if (f != null)
		{
			return (f.IsMainFunction && f.SubFunctions.Length != 0);
		}
		return false;
	}
}

Project proj;//a valid project
DMObjectsFinder finder = new DMObjectsFinder(proj);
Function[] functions = finder.GetFunctionsWithCF(new MyFilter());
//now as a result we have main functions having at least one subfunction.
Public Methods
 NameDescription
 MethodThis method should be overridden in order to implement the filter.  
Top
See Also