Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > Interoperability

opensession

We've made some changes. Use 'Ctrl-F5' to clear your browser cache.
Scroll Prev Top Next More

An interoperability command that opens a server session of selected Lumerical product via automation API. Once the session is opened, client product can call the server to execute arbitrary Lumerical script command(s) and execute them. Opened Lumerical session also allows to send and get variables from/to workspace.

 

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

 

Syntax

Description

s2=opensession('device');

When executed, this command will open a session of Device via the automation API.

 

Accepted parameters:

'fdtd'

'mode'

'device'

'interconnect'

 

Example

The following code example opens Device as a server, sends local variable 'x' to Device workspace followed by a command to manipulate the variable and the retrieves the result before closing the session:

 

#Opend Device session

s2=opensession('device');

 

#Declare local variable x

x=2;

 

#Send the local variable to Device workspace via API

putremotedata(s2,'x_device',x);

 

#Send script command to Device via API andsquare the variable

evalremote(s2,"y_device=x_device^2;");

 

#Get the variable from Device worksapace via API 

?y=getremotedata(s2,'y_device');

 

#Close the session

closesession(s2);

 

See Also

closesession, putremotedata, getremotedata, evalremote

Copyright Lumerical Inc. | Privacy | Site Map