OpenSchem Function

Opens a schematic similar to the command OpenSchem but returns a code indicating success or otherwise.

Arguments

Number Type Compulsory Default Description
1 string Yes File path
2 string array No Options

Argument 1

Schematic file path.

Argument 2

Options. String array may contain any of the following:
Option Description
'cd' Change current working directory to the location of the specified schematic file
'readonly' Open in read only mode
'selectiveReadOnly' Open in read only mode if the schematic file cannot be opened for writing

Returns

Return type: string array

The return value is a string array. The first element may be one of the following:
Code Description
NOERR Schematic opened successfully
OPEN_WITH_ERRORS Opened with some errors reported in later array elements
OPEN_WITH_WARNINGS Opened with some warnings reported in later array elements
SC_READONLY Schematic file is read only. If 'readonly' or 'selectiveReadOnly' was specified as an option, then the schematic would have been successfully opened but it will not be possible to save it to the same file.
SC_LOCKED Schematic file is in use by another SIMetrix user. If 'readonly' or 'selectiveReadOnly' was specified as an option, then the schematic would have been successfully opened but it will not be possible to save it to the same file.
FILE_NONAME No file name was given. (Arg1 an empty string)
FILE_CANTOPENFORREAD Can't open specified file because it doesn't exist or the path is bad

Subsequent elements may provide additional information about errors or warnings