Hello,

In our SiEPIC EBeam PDK https://github.com/lukasc-ubc/SiEPIC_EBeam_PDK, we have an option to run Monte Carlo simulations. These require a wafer map and other MC parameters. We define these as global variables, and each component can read these variables using the %% notation, e.g., %MC_grid%. This works fine when doing Monte Carlo simulations.

However, if we start a new project with normal simulations, these variables aren’t defined. And then the components all pop up errors that the variables are undefined.

See below.

Is there another way of passing optional variables? There is a command called “exist”, but it doesn’t seem to work on these global variables. We don’t actually need the in the dialog box, but rather within the script, so perhaps there is an “exist” approach?

I tried to create a variable in the Script Prompt, e.g., a=1. I see it in the Script Workplace. But I can’t seem to access it in the components’ Setup Script.

‘ebeam_wg_integral_1550_1::MC_grid’: Error evaluating expression, MC_grid is not a valid function or variable name

‘ebeam_wg_integral_1550_1::MC_resolution_x’: Error evaluating expression, MC_resolution_x is not a valid function or variable name

‘ebeam_wg_integral_1550_1::MC_resolution_y’: Error evaluating expression, MC_resolution_y is not a valid function or variable name

‘ebeam_wg_integral_1550_1::MC_uniformity_width’: Error evaluating expression, MC_uniformity_width is not a valid function or variable name

‘ebeam_wg_integral_1550_1::MC_non_uniform’: Error evaluating expression, MC_non_uniform is not a valid function or variable name

‘ebeam_wg_integral_1550_1::MC_uniformity_thickness’: Error evaluating expression, MC_uniformity_thickness is not a valid function or variable name

Thank you

Lukas