Please enable JavaScript to view this site.

Knowledge Base

System commands for interacting with the OS file system, running script files, etc.

 

System commands

Command

Description

newproject

Creates a new layout environment.

new

Creates a new simulation project file.

save

Saves an fsp file or lms file.

load

Loads an fsp file or lms file.

del

rm

Deletes a file.

ls

dir

Lists the files in a directory.

cd

Changes the working directory.

pwd

Returns the current working directory.

cp

Copy a file.

mv

Move a file.

exit

Exit the application.

system

Run command prompts.

fileexists

Check if a file exists.

currentfilename

Get the current filename.

currentscriptname

Get the current script filename.

filebasename

Get the file base name from a string.

filedirectory

Get the file directory from a string.

fileextension

Get the file extension from a string.

copytoclipboard

Copy to system clipboard.

pastefromclipboard

Paste from system clipboard.

hide

Hides the GUI.

show

Shows the GUI.

clearlogwindow

Clears output log window.

version

Returns the current version of the application.

versionfile

Returns the current version of the file loaded by the application.

fileexpand

Expands a file name by replacing any environmental variables.

autosaveon

Automatically saves current project before running a simulation.

autosaveoff

The project will not be saved automatically before running a simulation.

read

Read data from s text file as a string.

exist

Check the existence of a variable, script or script file.

exporthtml

Generates an html file describing an element.

help

Opens the Lumerical knowledge base using the default web browser.

logmessage

This function sends messages from scripted elements to the INTERCONNECT output window.

refresh

Reloads the current project.

operatingsystem

Returns the current operating system.

setconnectionrouting

Sets the connection routing for a given connection.

findproperty

Returns a cell containing all elements in the circuit that have a certain property.

findpropertyvalue

Returns a cell containing all elements in the circuit that have a certain property with a certain value.

refresh

Reloads the current project.

runinitialize

Initializes a step by step simulation.

runstep

Runs a single simulation step.

runfinalize

Finalizes a step by step simulation.

waituntildone

This function only returns after the current simulation is done.

runstartupscripts

Runs the start-up scripts.

 

Encrypt script commands

Command

Description

encryptscript

Saves a copy of the specified script file in an encrypted format.

 

List of script commands

Command

Description

getcommands

Returns a list of available script commands.

 

Starting and stopping scripts

Command

Description

running a script

Type the script name to run it.

scriptautorun

Disable or enable running script files automatically by typing the script name.

getpath

Get the current path.

addpath

Add a directory to the path.

clearpath

Remove"directory" from the script path if it is there.

which

Where in the path is a file.

pause

Pauses program for a time.

break

Will stop a script file from executing at that line.

ESCAPE key

To interrupt a script file from running or a long block of commands from executing

 

Checking status

Command

Description

issweep

Checks if the simulation is in sweep mode.

isstruct

Determines whether input is a structure.

iscell

Determines whether input is a cell.

isfield

Determines whether input contains filed.

getfield

Returns the value of a field from a structure.

setfield

Assigns a value to a structure input field.

 

File input and output

Command

Description

format

Set the precision of the script interpreter.

STD OUT


write

Writes strings to text files or to standard output.

LDF files


loaddata

Load variables or d-card data from ldf file.

savedata

Save variables to ldf file.

savedcard

Saves d-card data to an ldf file.

Text files


readdata

Read text files.

write

Writes strings to text files or to standard output.

fld (field) files


asapexport

Export monitor data to fld file.

asapload

Load data from fld file.

asapimport

Import data from fld file to Import source.

VTK files


vtksave

Save in .vtk format

Touchstone files


touchstoneload

Loads passive network data from a file containing Touchstone file formatted s-parameters.

SPICE Netlist


importnetlist

Imports an optical SPICE netlist.

exportnetlist

Export a netlist for the current circuit.

Comma separated value (csv)


exportcsvresults

Exports simulation results to comma separated value formatted files.

Tecplot files


tecplotread

Imports data from tecplot format files.

STL files


readstltriangles

Imports vertex data from an STL file.

PSF folder


setpsfoutput

Specifies the location of the PSF folder

 

Debugging

Command

Description

debug

Opens the debug utility window.

 

See Also

exportfigure, load, save

Copyright Lumerical Inc. | Privacy | Site Map