Ansys Learning Forum Forums Discuss Simulation Photonics Trapezoidal ring Reply To: Trapezoidal ring

Kirill
Ansys Employee

Hello Rahul,

This script (LSF) creates 10 waveguides in a ‘for’ loop. Feel free to adapt it to your needs.

# Loop to add waveguides with incremental positions
for (x = 1:10) {
    addwaveguide;
    set("name", "wg_" + num2str(x)); # Set unique name for each waveguide
    set("y", x * 2.0e-6);            # Position waveguide based on index
}

Best regards,

Kirill