Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.

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

Kirill
Forum Moderator

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

[bingo_chatbox]