WMS:File Menu

From XMS Wiki
Revision as of 15:13, 28 September 2017 by Jcreer (talk | contribs) (→‎Save As)
Jump to navigationJump to search

The File menu is one of the standard menus and is available in all of the modules. The commands in the File menu are used for file input and output for the WMS file types, for printing, and to exit the program.

The following commands are contained in the File menu:

New

The New command (Ctrl+N), or New WMSIcon New.png macro, deletes all data associated with all data types and all modules. As a result, a warning message will appear asking if still wanting to save changes to the project, giving a last chance to save. This command should be selected when an entirely new modeling project is started. The default settings are not restored, so if wanting to restore all of the settings, exit WMS completely and restart.

Open

The Open command (Ctrl+O), or Open Open Macro.svg macro, is used to read all files. Unlike previous versions of WMS where the Open command was used to open WMS native file types and the Import command was used to open non-native files, in version 7.0 all files are opened with the Open command where the file filter in the "Files of type:" drop down indicates the type of file to be opened.

Example of the Open dialog.

While any file can be opened from any module, the extensions listed tend to relate primarily to the active module. For example when in the terrain module, the extensions for *.tin and *.dem are visible, but they do not appear in the map and other modules.

If a project file is selected, all of the files listed in the project file will be read in.

The five most recently opened files are listed at that bottom of the File menu. Selecting a file from this list will reopen it.

Drag and Drop

Dragging any WMS supported file from a Windows Explorer to the main window in WMS and it will open, or initiate the specific Import dialog such as DEMs, or shapefiles.

Import from Database

The Database Import Wizard allows accessing data stored in a database and import it. The wizard is invoked by selecting the Import from Database command from the File menu. The data types that can be imported by the Database Import Wizard are the same data types that are supported by the File Import Wizard. Like the File Import Wizard, database data must be formatted in columns to be imported.

The Database Import Wizard has four steps:

Step 4 is identical to the last step in the File Import Wizard.
Step 1 – Connecting to a Database

Step 1 of the wizard lets you set up a connection to a database. To connect to a database either on the same computer or on a network press the Connect to Database button. Once a database connection is created, a path to the database and the different tables in the database are displayed. When a table is selected its columns are displayed along with the number of rows in that table.

Step 2 – Querying Information from a Database Table

Step 2 allows you to create, copy, delete, and import queries that retrieve data from a database. To help in writing the queries, the tables in the database are displayed, as well as the columns in the selected table.

Some SQL Basics
The query is an SQL (Structured Query Language) statement. The SQL statement is entered in the Query SQL statement edit field. An example of an SQL statement would be: “SELECT x, y, z, toluene FROM multipledatasets”. This statement means that columns x, y, z, and toluene from the table multipledatasets will be retrieved from a database. SQL statements are case sensitive. SQL statements also require brackets around table or column names that have spaces. For example, to query data from a table titled “x coordinate” in the SQL statement it would be written as [x coordinate]. A full explanation of SQL is beyond the scope of this document.
You can write a short description for each query in the Query description edit field. The New button creates a new query that has a default name, description, and SQL statement. The Copy button creates a copy of the currently selected query. The Delete button deletes the currently selected query.
The queries you define are saved automatically by WMS in a file called wmsquery.ini, located in the folder where WMS is installed. The Import button allows you to import a list of queries from any file that follows the same format as the wmsquery.ini file.
Step 3 – Viewing the Results of the Query

Step 3 displays the results of the database query. Only the first 20 rows are displayed in a spreadsheet. If the results are not what you wanted, you can go back to Step 2 and modify the query.

Step 4 – Assigning Column Types

Step 4 is identical to Step 2 of the File Import Wizard.

Save

The Save command (Ctrl+S),or Save Save macro icon.png macro, is used to save WMS projects. A project contains all of the files associated with a modeling project.

When a WMS project is saved, all files associated with the data currently in memory are saved. This includes any model simulations which are open. The model simulations are saved to the path most recently specified using the Save As command in the model interface menu.

Save As

The Save As command is used to designate the path and prefix file name for saving a WMS project. It can also be used to save a single file as specified by the extension indicated in the Save as type: drop down combo box.

Previous versions had a separate command for exporting files (saving files in formats not native to WMS), but exporting is now handled by specifying the appropriate extension in the Save As dialog.

Example of the Save As dialog.

Publish to Web

The Publish to Web command is a specialized command for the US Army Corps of Engineers that allows them to share results of models by publishing a graphic of the current window along with some metadata explaining the project. Alternatively the WMS project files can be zipped and uploaded with the published content. This command first requires authenticating to a web service with CDF capabilities. After successful authentication you can specify the metadata (description) and choose whether or not to upload the WMS screen capture and/or the project data files.

Print

Printed copies of WMS window displays can be generated by using the Print command or the Print Print macro icon in WMS.png macro. WMS will print to any printer supported by Windows.

When the Print command is selected the standard Windows Print dialog comes up allowing you to pick your printer, paper orientation and the typical printing parameters.

If you wish to control the size and location of the print on the paper then you should access the Page Layout command from the File menu.

Printer Setup

The Printer Setup command allows you to control the orientation of the printed image on the sheet of paper and the paper size. For Windows versions the standard Printer Setup dialog for the currently selected printer device will be brought up which allows you to change other relevant parameters of the currently selected printer.

Page Setup

The Page Setup dialog allows you to change the size and position of the printed image on the paper. It also allows you to specify margins, paper size, and orientation.

The image size is controlled by specifying the model units for an inch (or centimeter) of the paper. The scale toggle determines whether or not a scale legend is printed. The text color and font of the scale legend can be selected by clicking on the colored rectangle to the left of the toggle. If the Maintain Aspect Ratio toggle is not on then a scale legend cannot be printed.

Edit File

The Edit File command allows you to examine (or edit) any text file from within WMS. This command is particularly useful if errors occur while running a simulation using one of the hydrologic models supported by WMS. If a model does not run to a successful completion, errors can usually be found by examining the ASCII output file.

You will be prompted for the name of a text editor (Notepad is the default) and then the file is brought up in the specified editor. You can use the Find Other button to locate a different word processing *.exe file and the "Never ask this again" toggle can be set so that you are not prompted for the word processing program each time.

Register WMS

In WMS, components (modules, interfaces) can be licensed individually depending on what is needed. The components of WMS are licensed using a password system. The Register WMS command is used to enter a password that enables the licensed components. This command can be used to enable the program after initially installing WMS, or for adding additional modules to the program at a later time.

Exit

The Exit command (Ctrl+X) will exit WMS and terminate the program. Any data not yet saved to files will be lost and so you will be prompted before exiting to confirm that you have saved your most recent edits.

Related Topics