Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language

Manipulating objects

Scroll Prev Top Next More

Physical structures, sources, monitors, and the simulation volume itself are considered objects. Objects generally have properties that can be modified.

 

Selecting and deleting objects

Command

Description

groupscope

Changes the group scope.

deleteall

Deletes all objects in the current group scope.

delete

Deletes the selected objects.

selectall

Selects all objects in the current group scope.

unselectall

Unselect all objects.

select

Selects objects with a given name in the current group scope.

selectpartial

Selects any objects where partialname can be found in the name.

shiftselect

The same as select("name"); but does not unselect currently selected objects. Can be used to select multiple objects.

shiftselectpartial

The same as selectpartial("partialname"); but does not unselect currently selected objects. Can be used to select multiple objects.

 

Moving and copying objects

Command

Description

move

Move an object.

copy

Copy an object.

addtogroup

Add an object/objects into a group.

 

Object properties

Command

Description

adduserprop

Add a user property to a structure group.

addanalysisprop

Adds a analysis property to a selected object group.

addanalysisresult

Adds a new result to an analysis group.

set

Set a property of selected objects.

setnamed

Set a property of any objects with a given name.

setglobalmonitor

Set global monitor properties.

setglobalsource

Set global source properties.

setposition

Set an element's vertical and horizontal positions.

setrectangle

Set width and height of an element rectangle.

setactivesolver

Set the specified solver as the active solver.

getactivesolver

Get the active solver.

runsetup

Force group setup scripts to run.

get

Get a property of selected objects.

getnumber

Get the number of selected objects.

getnamed

Get a property of any objects with a given name.

getnamednumber

Get the number of objects with a given name.

getglobalmonitor

Get global monitor properties.

getglobalsource

Get global source properties.

getposition

Get current horizontal or vertical position of an element.

getrectangle

Get the width or height of an element rectangle.

haveproperty

Returns the number of selected objects with a particular property.

importsurface

Import surface data from a file. Only applies to import primitives.

importsurface2

Import surface data from script variables. Only applies to import primitives.

importnk

Import n and k data from a file. Only applies to import primitives.

importnk2

Import n and k data from script variables. Only applies to import primitives.

setsourcesignal

Set a custom source time signal.

updatesourcemode

Updates the mode for a mode source.

clearsourcedata

Clears source data for an imported source, or the selected mode for a mode source.

setexpansion

Associates a DFT monitor with a mode expansion monitor.

removeexpansion

Removes a DFT monitor from a mode expansion monitor.

getname

Returns the dataset name of the variable selected.

setname

Sets the dataset name of the variable selected.

importdataset

Imports an unstructured dataset named 'charge' to an 'eh Density' grid attribute.

cleardataset

Clear the dataset from any current grid attribute.

getcelllist

Returns the list of cells associated with the loaded gds file.

getlayerlist

Returns the list of layers associated with the loaded gds file.

setlayer

Sets the properties of a specified layer of the selected layer builder object.

loadgdsfile

Loads specified gds file into the layer builder object.

geteigensolver

Sets the properties of the eigensolver in the mode source, mode expansion monitor or port.

seteigensolver

Sets the properties of the eigensolver in the mode source, mode expansion monitor or port.

updateportmodes

Selects the specified modes in the selected port object. Modes are specified by the mode number in the eigensolver's mode list.

clearportmodedata

Clears mode data from selected port.

readnportsparameterat

Interpolates the S-Parameter sweep file with the specified parameter values.

convertnportsparametersweep

Converts the textual S-Parameter sweep file to a binary file.

 

Controlling the view

Command

Description

redraw

Redraw graphics.

redrawoff

Turn automatic redraw off.

redrawon

Turn automatic redraw on.

redrawmode

Get the current status of automatic redrawing; turn it off or on

setview

Control how the graphics are drawn in the Layout Editor

getview

Get the current view control properties from the Layout Editor.

orbit

A built in function to do an orbit of the perspective view with option of creating a movie.

framerate

Measure graphics performance of your computer.

 

Element/connection properties

Command

Description

set

Set a property of selected element.

setnamed

Set a property of any element with a given name.

get

Get a property of selected element.

getnamed

Get a property of any element with a given name.

addport

Add a port to a compound/scripted element.

removeport

Remove a port from a compound/scripted element.

connect

Connects one element to another via the specified ports.

disconnect

Removed a specific connection between two elements.

autoarrange

Arranges port positions and dimensions of compound or scripted elements automatically

createcompound

Creates a compound element with the currently selected elements.

addproperty

Adds a property to a compound or to a scripted element.

setexpression

Sets the selected element's specified property to the mentioned expression.

flipelement

Flips an element in the schematic editor.

rotateelement

Rotates an element in the schematic editor.

seticon

Set a user defined icon for an element.

 

Undo and redo commands

Command

Description

undo

Undo last modify object command.

redo

Redo command after an undo.

historyon

Enables taking snapshots (history) for the current schematic for undo redo functionality.

historyoff

Disables taking snapshots (history) of the current schematic for undo redo functionality.

Copyright Lumerical Inc. | Privacy | Site Map