API Help
Eplan.EplApi.HEServices Namespace / SelectionSet Class
Members Example

In This Topic
    SelectionSet Class
    In This Topic
    Class providing functionality to get selected objects from a current dialog of EPLAN.
    Inheritance Hierarchy

    System.Object
       Eplan.EplApi.HEServices.SelectionSet

    Syntax
    public class SelectionSet 
    public ref class SelectionSet 
    Remarks
    The methods usually return an empty result if there is more than 1 one project open, except from SelectedProjects and GetCurrentProject(true).
    Example
    The following example shows how to use class SelectionSet.
    SelectionSet selectionSet = new SelectionSet();
    StorableObject[] storableObjects = selectionSet.Selection;
    if (storableObjects.Length == 0)
    {
        Console.Out.WriteLine("No current selection!");
        return;
    }
    else
    {
        Console.Out.WriteLine("Current selection contains of:");
        foreach (StorableObject so in storableObjects)
        {
            Console.Out.WriteLine("Object type: " + so.GetType().ToString());
        }
    }
    
    
    SelectionSet selectionSet = new SelectionSet();
    //If any selected object will be changed, LockProjectByDefault must be set to true before obtaining any object
    selectionSet.LockProjectByDefault = true;
    Project oProject = selectionSet.GetCurrentProject(false);
    oProject.ProjectName = "new_name";
    
    
    Public Constructors
     NameDescription
    Public ConstructorDefault constructor.  
    Top
    Public Properties
     NameDescription
    Public PropertyDetermines Page or InstallationSpace currently edited in graphical editor.  
    Public PropertyDetermines whether a document is selected. This will only return a document, when the selection is inside the graphical editor.  
    Public PropertyDetermines whether exactly one object is selected.  
    Public PropertyDetermines whether a page is selected.  
    Public PropertyIf set to true, the objects returned and the rest objects from project by the SelectionSet method are locked. Default value is false.  
    Public PropertyIf set to true, the objects returned by the SelectionSet methods are locked. Default value is true.  
    Public PropertyGets installation spaces opened in GED.  
    Public PropertyGets pages open in GED.  
    Public PropertyGets all selection project's messages.  
    Public PropertyReturn the selected projects of the active dialog as an array. If you select elements from different projects inside of one dialog you can determinate the selected projects.  
    Public PropertyGets the complete selection on the active window. Property LockProjectByDefault should be set to true before any changes on any inside elements of obtained objects.  
    Public PropertyGets the complete selection on the active window. Property LockProjectByDefault should be set to true before any changes on any inside elements of obtained objects.  
    Top
    Public Methods
     NameDescription
    Public MethodFor internal use.  
    Public MethodDetermines the active project.  
    Public Method\Returns the first selected object.  
    Public MethodGets the selected pages.  
    Top
    See Also