Eplan Platform API
Eplan.EplApi.HEServices Namespace / Search Class
Members Example

In This Topic
    Search Class
    In This Topic
    Class providing functionality to search within a project.
    Inheritance Hierarchy

    System.Object
       Eplan.EplApi.HEServices.Search

    Syntax
    [DefaultMember("Setting")]
    public class Search 
    [DefaultMember("Setting")]
    public ref class Search 
    Example
    The following example shows how to use class Search.
    Search oSearch = new Search();
    
    // Set settings which will influence the search result
    oSearch[Search.Settings.CaseSensitive] = false;
    oSearch[Search.Settings.Texts] = false;
    oSearch[Search.Settings.DeviceTag] = true;
    oSearch[Search.Settings.AllProperties] = false;
    oSearch[Search.Settings.Texts] = false;
    oSearch[Search.Settings.PageData] = false;
    oSearch[Search.Settings.ProjectData] = false;
    oSearch[Search.Settings.GraphicPages] = false;
    oSearch[Search.Settings.EvalutionPages] = false;
    oSearch[Search.Settings.NotPlaced] = false;
    oSearch[Search.Settings.LogicPages] = true;
    
    Project oProject = new ProjectManager().OpenProject("$(MD_PROJECTS)\\ESS_Sample_Project.elk");
    
    //clear active search result list
    oSearch.ClearSearchDB(oProject);
    
    string textToFind = "EB3*";
    //Search the project
    oSearch.Project(oProject, textToFind);		
    
    //Get search results
    StorableObject[] arrObjects = oSearch.GetAllSearchDBEntries(oProject);
    
    //Replace text in a searched objects.
    string strSearchString = "EB3";
    string strReplaceString = "EBCD3";
    oSearch.Project(m_oProject, strSearchString);
    StorableObject[] arrObjects = oSearch.GetAllSearchDBEntries(m_oProject);
    
    oSearch.Replace(arrObjects, strSearchString, strReplaceString);
    Public Constructors
     NameDescription
    Public ConstructorDefault constructor  
    Top
    Public Properties
     NameDescription
    Public PropertyGets/Sets whether the specified setting of a search is enabled  
    Top
    Public Methods
     NameDescription
    Public MethodAdds cross-referenced objects to the goto results list.  
    Public MethodOverloaded. Adds objects to the currently active list of search results.  
    Public MethodClears the list of search results.  
    Public MethodDestructor  
    Public Method\Returns all objects in a list of search results.  
    Public MethodReturns objects from a list of search results.  
    Public MethodOverloaded. Searches on the specified page for a search string. The search settings will influence the result. The found object will be written to the active list of results.  
    Public MethodOverloaded. Searches on the specified project for a search string. The search settings will influence the result. The found object will be written to the active list of results.  
    Public MethodReplaces text in a searched objects.  
    Top
    See Also