CaseFileURLtoElement(url, caseFileElement[, checkURLExists])¶
For each case file that has been accessed during an AIMMS session, a new
element is created in the predefined set
AllCases. The predefined
CaseFileURL is updated accordingly. When working with a
selection of case files, for example in a multiple case view, or in
statements with the case dot notation, you should actually create a
AllCases. In that process, it may be useful to find the
corresponding element in
AllCases given the url of a case file.
CaseFileURLtoElement( url, ! (input) a scalar string expression caseFileElement, ! (output) element in AllCases [checkURLExists] ! (optional) 0 or 1 )
- A string referencing the url of a case file. This url can point to an existing file on your local file system, or to a network location. The given url does not need to be present in
- On return, this element parameter is set to the element in
AllCasesthat corresponds to the given url. In other words, the following condition will be true:
CaseFileUrl(caseFileElement) = url.
- checkURLExists (optional)
- If this value is set to 1 then the procedure always returns 0 if the specified url cannot be found in the underlying file system. If set to 0 and the underlying file does not exist, the procedure returns 1 if the corresponding element already existed in
AllCases. The default value is 0.
The procedure returns 1 on success. If any error occurs, the procedure returns 0 and
CurrentErrorMessagewill contain a proper error message.
- This function is only applicable if the project option
Data_Management_styleis set to
- If your application is linked to the AIMMS PRO server, the url can also point to a case file stored at the server.
- If url exists, but is not in
CaseFileURL, an element will be added to
- If url does not exist, but there is a corresponding entry
CaseFileURL, the procedure returns is 1 if checkURLExists is set to 0 and it returns 0 if checkURLExists is set to 1.