Procedure CaseFileSave(url, contents)


The function CaseFileSave saves a specific subset of identifiers to a case file. If the file already exists, it is completely overwritten.

    url,                          ! (input) a scalar string expression
    contents                      ! (input) a subset of AllIdentifiers



A string referencing the url of the case file in which you want to save the data. This url can point to a file on your local file system, or to a network location.


A subset of AllIdentifiers containing all the identifiers that must be saved. Preferrably, this set is an element of AllCaseFileContentTypes such that, when reading back the case file, the content type can be determined correctly.

Return Value

The procedure returns 1 on success. If any other error occurs, the procedure returns 0 and CurrentErrorMessage will contain a proper error message.


  • This function is only applicable if the project option Data_Management_style is set to Disk_files_and_folders.

  • This function will only save the data to the specified file. It does not change the value of CurrentCase or CurrentCaseFileContentType, nor does it mark the current data as being saved.

  • If your application is linked to the AIMMS PRO server, the url can also point to a case file stored at the server.

  • When you save using CaseFileSave to an existing .data file with sections, the sections are removed.

See also

The functions CaseFileSectionSave and CaseFileLoad