Harness proD API Help
EPLAN.Harness.API.DataStructures Namespace / ViewsController Class
Members Example
In This Topic
    ViewsController Class
    In This Topic
    Controller of views.
    Object Model
    ViewsController ClassMappedViewsCollection ClassView ClassView ClassView ClassView ClassView ClassView ClassView ClassView ClassView Class
    Inheritance Hierarchy

    System.Object
       EPLAN.Harness.API.DataStructures.ViewsController

    Syntax
    public class ViewsController 
    Example
    This example shows how to delete view from the mapped slot.
    // Get a graphic document.
    GraphicDocument document = GetDocument("Document");
    document.Open(false, false);
    
    // Get the views controller.
    ViewsController views = document.Views;
    					
    // Delete view from mapped slot 2.
    views.View2 = null;
    					
    // Alternative method using collection of mapped views:
    // views.MappedViews[1] = null;
    					
    // Save the document.
    document.Save();
    This example shows how to move view from one mapped slot to another.
    // Get a graphic document.
    GraphicDocument document = GetDocument("Document");
    document.Open(false, false);
    
    // Get the views controller.
    ViewsController views = document.Views;
    
    // Move view from mapped slot 4 to the slot 1.
    View view = views.View4;
    views.View1 = view;
    					
    // Alternative method using collection of mapped views:
    // View view = views.MappedViews[3];
    // views.MappedViews[0] = view;
    
    // Mapped slot 4 returns null now.
    // views.View4 == null
    
    // Save the document.
    document.Save();
    This example shows how to move view from the mapped slot to the list of unmapped views.
    // Get a graphic document.
    GraphicDocument document = GetDocument("Document");
    document.Open(false, false);
    
    // Get the views controller.
    ViewsController views = document.Views;
    
    // Move view from mapped slot 3 to the list of unmapped views.
    View view3 = views.View3;
    views.UnmappedViews.Add(view3);
    
    // Alternative method using collection of mapped views:
    // View view3 = views.MappedViews[2];
    // views.UnmappedViews.Add(view3);
    
    // Mapped slot 3 returns null now.
    // views.View3 == null
    // views.MappedViews[2] == null
    
    // Save the document.
    document.Save();
    Public Properties
     NameDescription
    Public PropertyCollection of mapped views.  
    Public PropertyCollection of unmapped views.  
    Public PropertyMapped view slot 1.  
    Public PropertyMapped view slot 2.  
    Public PropertyMapped view slot 3.  
    Public PropertyMapped view slot 4.  
    Public PropertyMapped view slot 5.  
    Public PropertyMapped view slot 6.  
    Public PropertyMapped view slot 7.  
    Public PropertyMapped view slot 8.  
    Top
    Public Methods
     NameDescription
    Public MethodSave current camera and visibility state.  
    Public MethodRestore saved camera and visibility state from given view.  
    Top
    See Also