//Creates a new document by copying an old document
        public NuGenDocument NewDocument(NuGenDocument doc)
        {
            if (docViewMap.Count == 0)
            {
                form.EnableControls();
            }

            NuGenView view = new NuGenView(form, doc, this.SendStatusMessage);
            activeView = view;
            activeView.Focus();
            view.Activate();
            view.FormClosing += new FormClosingEventHandler(View_Closing);
            docViewMap.Add(doc, view);
            form.StatusPermanentMessage("Three axis points or the scale bar must be defined.");

            return doc;
        }
        //Initializes a new document and its corresponding view when importing or opening a document
        public NuGenDocument NewDocument()
        {
             NuGenDocument doc = null;


             if (docViewMap.Count == 0)
             {
                 form.EnableControls();
             }

             if (ActiveDocument != null) {
               // this document is not the first so start up in same state as previous document for continuity
                 doc = new NuGenDocument(ActiveDocument.DigitizeState);
             }
             else
             {
                 doc = new NuGenDocument(NuGenDefaultSettings.GetInstance().SessionsSettings.initialDigitizeState);
             }

             NuGenView view = new NuGenView(form, doc, this.SendStatusMessage);
             activeView = view;
             activeView.Focus();
             view.Activate();
             view.FormClosing += new FormClosingEventHandler(View_Closing);
             docViewMap.Add(doc, view);
             doc.UpdateListeners();
             form.StatusPermanentMessage("Three axis points or the scale bar must be defined.");

             activeView.ShowCoordinates += new NuGenView.Show_Coordinates(this.Show_Coordinates);
            
             return doc;
        }