Parameters
- name
- Name of the saved view.
Return Value
Saved view.
Exception | Description |
---|---|
EPLAN.Harness.API.Exceptions.FileClosedException | This file is not opened. |
EPLAN.Harness.API.Exceptions.ArgumentNullException | Argument is null. |
// Get a graphic document. GraphicDocument document = GetDocument("Document"); document.Open(false, false); // Set the camera and visibility state of this document. // Get the views controller. ViewsController views = document.Views; // Save current view with name 'MyView'. View view = views.SaveCurrentView("MyView"); // At this moment you can find this view in the list of unmapped views. // View myView = views.UnmappedViews.First(v => v.Name == view.Name); // Map this view to slot 7. views.View7 = view; // Alternative method using collection of mapped views: // views.MappedViews[6] = view; // The view is stored in mapped slot 7 and no more in the list of unmapped views. // Save the document. document.Save();