putv#
- INTERCONNECT.putv(varname, value)#
Low level script workspace method that puts a variable from the local Python environment into an active Lumerical session.
This method is a low level method that interacts directly with the script workspace in Lumerical. It is not recommended to use this unless a specific function needs to be achieved.
- Parameters:
- Returns:
- Raises:
LumApiErrorIf the method cannot retrieve the variable or the data type is unsupported.
See also
getv()Gets a variable from the Lumerical session.
- Passing data
Information on how passing non-dataset variables are handled.
- Accessing simulation results
Information on how passing datasets are handled.
Examples
Putting a string from Python to Lumerical, then retrieving it and printing its type.
>>> with lumapi.FDTD(hide = True) as fdtd: >>> Lumerical = 'Ansys Inc' >>> fdtd.putv('Lum_str',Lumerical) >>> print(type(fdtd.getv('Lum_str')),str(fdtd.getv('Lum_str')))
Returns
>>> <class 'str'> Ansys Inc