Project Structure

From SysCAD Documentation

Jump to: navigation, search

Navigation: User Guide -> Project Structure

Contents

Location of Project Files

For SysCAD to function correctly, it is important to keep files at the correct locations. Below is a suggested folder structure for SysCAD projects:

Image:projectstructure.jpg

  • Folder ...\SysCADProjects
This is a user created folder to store SysCAD project group folders. The root directory is not important. The user may wish to add this to their local computer drive or to a network drive.
  • Folder ...\SysCADProjects\Client 1
This is a user created folder to store SysCAD projects. Throughout the documentation, this folder will be referred to as the project group. For example, SysCAD projects done for Client 1 might belong to Client 1. In general, if projects share the same customised species database, they should be grouped together for better file management.
If SysCAD is shared across the network, the project group folder can be either on the server machine or on the local machine.
In the Client 1 folder there are 4 subfolders.
  • Folder ...\SysCADProjects\Client 1\CfgFiles
This folder is created by SysCAD when the user creates a new Project Configuration. The two most important files in this folder are the specie database (SysCAD.mdb) and configuration file (.cfg).
The project specific SysCAD.mdb file is an MS Access database containing a species table and an engineering unit table that is relevant to all projects as part of this project group. See Data Libraries for more information on the databases SysCAD uses.
The project loading data is customised via the Project Configuration (cfg File), saved with an extension cfg.
Depending on options chosen, SysCAD may create other files and store them in this folder.
  • Folder ...\SysCADProjects\Client 1\Project 1 Base Case.spf
This is SysCAD project folder. When the user creates a project in SysCAD, the project related files are saved in this project folder. It contains the project.spj file, which is used to load the project; graphics files, trend files and other initialisation files. All model related data are stored in a MS Access Database called Scd_Mdls.Mdb in SysCAD 9.1 or ModelData.Mdb in SysCAD 9.2. See SysCAD Models Database.
  • Reference files locations
The referenced files are those written by the user, external to SysCAD. These include any Excel Reports, PGM files, reactions files, script files and driver files.
The referenced files are normally stored within the project folder.
  • Reaction files, .rct, must be stored in a folder within the project called Reactions.
  • Control files, .pgm, must be stored in a folder within the project called Controls.
It is a good idea to also store other reference files within the project folder as this will help to keep the project self-contained. However, it is possible to store them under other designated folders, eg, the cfgfiles folder.
It is up to the user to keep to a consistent format for good project management.
Some sample locations of the reference files are:
  1. Project folder: Default
  2. Project group\cfgfiles: This folder is in the search path of SysCAD, i.e. full path is not required when entering the file name in SysCAD.
  3. User defined folders, eg. SysCAD91\Project group\Excel Files. These folders are not in the search path of SysCAD, when entering the file name in SysCAD, full path is required, or use the Browse button to locate the files.
  • Folder ...\SysCADProjects\Client 1\Project 1 Scenario 1.spf
This is another SysCAD project folder. In this example, it is the same project but for a different scenario. The folder is still in the same project group as it is still using the same configuration file and SysCAD.mdb.
  • Folder ...\SysCADProjects\Client 1\Project 2.spf
This is another SysCAD project folder. In this example, it is a different project. The folder is still in the same project group as it is similar enough to Project 1 that the user wants to use the same configuration file and SysCAD.mdb.
  • Folder ...\SysCADProjects\Client 2\
This is a user created folder to store SysCAD project group folders.
  • Folder ...\SysCADProjects\Client 2\Cu Project
This is a user created folder to store SysCAD projects (ie. a project group folder). In this case, it is for Cu Projects for Client 2. Note that there is another folder for Ni Projects for Client 2. This shows that the main structure that the user needs to keep in place is to have all similar projects and their CfgFiles folder together.

Copying files across the network

Projects can be copied from local machine to the network. Note that it is important that the copied project can find and use the correct SysCAD.mdb and configuration (.cfg) files. If care is taken and the organisation of folders are the same you can load the project directly. However, to ensure the correct SysCAD.mdb and configuration (.cfg) files are used, the open with Alternate configuration command - File - Open (Alt cfg) should be used when opening a project from a different location.

For example:

A SysCAD project Digestion.spf (using c:\SysCAD Projects\Alumina\cfgfiles\alumina.cfg) is copied from C: drive to the P: drive. When opening this project on P: drive, user should use Open (Alt cfg) and can select P:\SysCAD projects\Alumina\cfgfiles\alumina.cfg file.

Creating a New Project Group

SysCAD can help create some skeleton files for the new project group. To do so, start SysCAD; make sure all SysCAD projects are closed. From the File menu, select New|Project. This will open the Creating a New Project Dialog box; topic New Project explains the functions of the different buttons.

To create a new Project Group, Select New, this will open the New Configuration Dialog box. Type in a name in the New Configuration Name field. Once this is entered, SysCAD will try to create a folder for you, using the configuration name as the Project Group name. This will be entered in the Path text box. Please make sure the path and name for your new Project group is correct. Press OK to close the dialog box.

This will add the new configuration file into the Creating a New Project Dialog box. You may edit this configuration file by pressing the Edit button. (See Project Configuration (cfg File) for more information.)

If you now press OK to close the Creating a New Project Dialog Box, You will be prompt the Create As dialog box, type in a new project name and press save. SysCAD will now check and load the configuration file and build the new project.

After the project is created, open/switch to explorer you will find that a new project group has been created under SysCAD. Under the project group folder, there is a subfolder called Cfgfiles, a database file SysCAD.mdb will be present in that folder. This database contains necessary blank tables ready for data input for the new project(s). However, you will find that compound water has been entered into the species table. Return to SysCAD, use menu commands Project - Edit Database to edit the species table. (See Species Table for more information.)

After the new species have been entered, you may go back to Edit Configuration and add the new species to the load list (see Specie Configuration for more details), remembering first to close any opened project.


Related Topics:

SysCAD Commands and Short Cut Keys - File Commands - New Project.

Project Configuration (cfg File)

Data Libraries: Editing SysCAD Database

SysCAD Projects Files

The process model developed in SysCAD is termed a SysCAD project and all data related to the project are stored in a project folder. This folder is marked with the extension spf (SysCAD Project Folder). We have looked at the structure of an example folder briefly in the previous headings. We now list all the possible files that may appear in the project folder.

The master document file is given the extension spj (SysCAD Project). This file is generated when a new project is created and is used to reopen the project in SysCAD at a later time. A SysCAD project can comprise many files with different extensions, storing data related to different aspects of the project. Some data files are specific to one project, for example unit model data files, while other files can be shared between projects eg, chemical reaction files.

Project specific files must be stored in the folder allocated by SysCAD. Shared files can be stored in any folder allocated by the user. To avoid housekeeping problems, care should be taken when storing shared files to directories. Table 1 outlines all the file types that can be part of a SysCAD project.

Table 1: Files in a SysCAD Project

File Type Default Name Essential SysCAD Created
Project Master Project.spj Yes Yes
Project InitialisationScd_prj.ini (Options.Project.ini in SysCAD 9.2) Yes Yes
Project LayoutScd_Lay.ini (Options.WindowArrangement.ini in SysCAD 9.2) Yes Yes
MiscellaneousOther.dat No Yes
Project Group Configuration ProjectGroup.cfg *** Yes No
Species database SysCAD.mdb ** Yes No
Unit ModelsScd_Mdls.Mdb (ModelData.Mdb in SysCAD 9.2) Yes Yes
Graphicsscg Yes Yes
Trendtrn or trc No Yes
Historianhist_cfg.hed, hist_dat.001, hist_cfg.cat No Yes
Scenariosssn (this can be saved as a zip file) No Yes
Snapshotsnp (this can be saved as a zip file) No Yes
Drawing*dxf Yes Yes/No
Reactions rct No No
Reports xls No No
General controller program pgm No No
Profiles csv No No
Script files ssc No No
Data TransferSCD_CBk.ini (CopyBlockData.ini in SysCAD 9.2)** No Yes
Quick ViewSCD_RTL.ini ** No Yes
Remote Files Information RmtFilesBackup.zip No Yes
SysCAD Marshal scm No No
SysCAD Marshal codeblock xls and dcb No No
Archive Reporter Configuration sac No No
Query csv No No

*Drawing files can be created using SysCAD or a third party package that produces drawings in dxf format.

**These files must be stored under the project cfgfiles folder.

*** This file is stored under the Project Group Folder.

File types in bold in Table 1 are created by SysCAD.

Loosing a file marked as essential in Table 1 could lead to a corrupted project.

Snapshot/scenario, historian, report and other.dat files contain information that is derived from running the SysCAD project and so can be reproduced if required.

Reactions, profiles, script files, general controller files, and PLC configuration files are external files generated by the user to control the way the project runs.

The "models".cfg and SysCAD.mdb files contained data related to the process model library (tanks, pipes etc.) and species (H2O, NaCl etc.) loaded on start up. These must be present.

SysCAD Models Database (scd_mdls.mdb or ModelData.mdb)

When loading or saving a SysCAD project, the model data is saved in a Microsoft Access database format. There are two key tables, the first is $Models which is a list of all models (including units and links) in the project. The second is $Connects which is a list of all the links and how they are connected to the units. All other tables contain further information about these models. Some state data of some models is saved in the file other.dat (for example state of PGM program variables). During a load, SysCAD always loads the $Models and $Connects tables first to create the basic flowsheet and then loads all the configuration and state data for all these models.

When you save a project, SysCAD increments the current revision number (the database field RevNo which is in every table) and saves new records in all tables with the new revision number (ie it does not overwrite or update existing records). If the project save to the database is successful, SysCAD then deletes all the records in all the tables that have the previous revision number. At the start of a load, SysCAD searches all the records in the table $Models to determine the highest RevNo and will use this as a key for all subsequent loads from all other tables.

Recovering a project that crashed during a save and fails to load:

As described above because new records with a higher RevNo are used during a save, if there is any problem or crash during a save, all the old records and some new records will appear in the tables. You can determine what the newest revision number was during the failed save, and delete all new records with the new revision number. This only needs to be done in the $Models and $Connects tables as these are the critical top level tables that are always loaded and saved first. So next time you try load the project, because there are no references to the new revision number, SysCAD will use the older revision and effectively load the older version of the project. In this way, in most cases, you can recover a project if it has become corrupt during a save. If it still fails, you can try deleting the file other.dat before loading again. If you can reproduce the conditions that cause the failure during a crash, then please contact Kenwalt so that we can rectify the problem.

Zipping up SysCAD projects

To zip up a SysCAD project, simply add all files under the project folder including all sub folders.

Personal tools
Document Sections