Import sections in text format
This feature allows you to launch EdiSIC, create a new blank document or modify an existing project, import files containing section data into text format and save it as TAL (for SIC Version 4.xx) or XML (for SIC version 5 .xx). For more information on the text import formats of the sections, see article dedicated.
Modifying an existing project allows you to keep all the data of hydraulic scenarios, quality modules and regulation modules. The reaches are then imported in the order of their numbering.
Syntax
Parameter Description
- "Work_directory": Working directory (in which the output XML or TAL file and a .log file will be generated). This working directory can be different from the current subdirectory, cf below;
- Import_Mode: this parameter can take 4 different values (and possible alternatives with _new or _update, see below) depending on the chosen import mode (see below import modes);
- "File to create": Name of the XML or TAL file to be created at the end of the import without the extension. A file of the same name with the .log extension will be created and will contain error messages for the operation, if any;
- "File1.txt" [, "File2.txt" ...]: Name of one or more file(s) .txt to import (full path or single name). Each .txt file represents a reach. The file order defines a branch from upstream to downstream. If the names of these files are not given with a full path, they will be searched by default in the current subdirectory, which is the last one used by Edisic (and stored in the sic.ini file under exe). If they are not found, the current subdirectory is changed into the working subdirectory defined above, which allows to have a library of txt files in a current subdirectory, and to create various XML or TAL files in subdirectories and with selected names as needed.
Import modes
There are 4 modes (and possible alternatives with _new or _update, see below) of choice to define the type of file created (Xml or Tal) and the format of the text file (normal or transposed):
Import mode | Text file format | Generated File Format |
---|---|---|
ImportXml | Normal | XML (SIC version 5.xx) |
ImportTal | Normal | TAL (SIC version 4.xx) |
ImportXmlTrans | Transposition | XML (SIC version 5.xx) |
ImportTalTrans | Transposition | TAL (SIC version 4.xx) |
If the project file already exists, the interface asks if the user wants to overwrite the project, modify the existing project or cancel the operation. It is possible to override this issue by adding either _NEW or _UPDATE to the import mode (Example: use IMPORTXML_NEW to overwrite an existing XML project file). Lowercase or uppercase can be used for these options.
Command line limitation: using EDISIC.MAC
Since the command line size is limited, it may be useful to set the command line in the EDISIC.MAC file and to run EdiSIC in "macro" mode.
Command Line Example
EDISIC.EXE "C:\Files\SicV5\dat\test" ImportXml "Demo" "bief1.txt" "bief2.txt"
The following actions will be performed:
- Creation of the file C:\Files\SicV5\dat\test\Demo.xml;
- Creation of the reach1 upstream;
- Import the cross-section of the reach 1 and their cross section from the file C:\Files\SicV5\dat\test\bief1.txt; (Or the bief1.txt file located in the current subdirectory if it exists)
- Creation of the reach 2 downstream of the reach 1;
- Import of cross sections from C:\Files\SicV5\dat\test\bief2.txt file; (Or the bief2.txt file located in the current subdirectory if it exists)
- Save the file C:\Files\SicV5\dat\test\Demo.xml. If this file already exists, a question is asked to allow overwriting.