OpenSchem

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

The return value may be one of the following:

Code Description
NOERR Schematic opened successfully
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