bdeExistsModel
Determines if a filepath is open or if a filename exists.
Syntax
boolean = bdeExistsModel(filename, filepath)
Inputs
- filename
- Name of the file. Used to see if file exists.
- filepath
- Type: string
Outputs
- bool
- Returns True when filename is not empty and the entire filepath is open in session. Returns False when filename is not empty and the filepath is not open. Returns True when filename is empty and the filepath exists. Returns False otherwise.
Examples
Check a model that does exist. Using no filename and the entire path:
boolean = bdeExistsModel('', 'C:\TestFolder\doesExist.scm')
boolean = 1
Check a model that does not exist. Using no filename and the entire path:
boolean = bdeExistsModel('', 'C:\TestFolder\doesNotExist.scm')
boolean = 0
Check a model that is not saved but is open in session:
boolean = bdeExistsModel('Model1', '')
boolean = 1
Check a model that is not saved and is not open in session (Does not exist):
boolean = bdeExistsModel('Model1234', '')
boolean = 0