Index: trunk/src/tmcsim/application.properties
===================================================================
--- trunk/src/tmcsim/application.properties	(revision 465)
+++ trunk/src/tmcsim/application.properties	(revision 466)
@@ -1,5 +1,5 @@
-#Fri, 26 Jul 2019 06:34:33 -0700
+#Sat, 27 Jul 2019 15:30:49 -0700
 
-Application.revision=464
+Application.revision=465
 
-Application.buildnumber=170
+Application.buildnumber=174
Index: trunk/src/tmcsim/cadsimulator/Coordinator.java
===================================================================
--- trunk/src/tmcsim/cadsimulator/Coordinator.java	(revision 465)
+++ trunk/src/tmcsim/cadsimulator/Coordinator.java	(revision 466)
@@ -3,5 +3,10 @@
 import java.io.File;
 import java.io.FileWriter;
+import java.io.IOException;
 import java.io.PrintWriter;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
 import java.rmi.RemoteException;
 import java.rmi.server.UnicastRemoteObject;
@@ -77,4 +82,5 @@
 import tmcsim.interfaces.SimulationManagerInterface;
 import tmcsim.simulationmanager.SimulationManagerView;
+import tmcsim.simulationmanager.actions.LoadScriptAction;
 
 /**
@@ -107,4 +113,9 @@
     private String kCADcommentLog;
     /**
+     * Filename where copy of incident script is written to be used by
+     * EI notebook.  The same path as kSimClockFilename is used.
+     */
+    private final static String kIncidentScriptFilename = "incident_script.xml";
+    /**
      * Error logger.
      */
@@ -540,9 +551,30 @@
         }
     }
-
+    /** Helper method to copy a file.  
+     * 
+     * @param selectedFile is the name of source file (without a path).
+     * The path will be extracted from kSimClockFilename and prefixed to the 
+     * selectedFile.  Fixes #178.
+     */
+    private void copyXMLfile(String selectedFile)
+    {
+        int ptr = kSimClockFilename.lastIndexOf(System.getProperty("file.separator"));
+        String foldername = kSimClockFilename.substring(0, ptr+1);
+        try {
+            Path destination = Paths.get(foldername + kIncidentScriptFilename);
+            Path source = Paths.get(selectedFile);
+            Files.copy(source, destination,REPLACE_EXISTING);
+            Logger.getLogger(Coordinator.class.getName()).log(Level.INFO,  
+                    "Loaded script copied to " + destination);
+        } catch (IOException ex) {
+            Logger.getLogger(Coordinator.class.getName()).log(Level.SEVERE, null, ex);
+        }        
+    }
+    
+    /** Load and parse the XML script from the given file */
     public void loadScriptFile(File scriptFile) throws RemoteException, ScriptException
     {
-
-
+        // Make a copy of the xml file to be used by EI notebook.
+        copyXMLfile(scriptFile.getPath());
         try
         {
