Photonics

Photonics

Topics related to Lumerical and more.

How can I access sweeps from scripting/python?

    • fabian.ruf
      Subscriber

      Hello, 

      I know that I can get a list of all names of sweeps by using "getsweepdata" without an argument. However, this will only return all sweeps for which there is data available. 
      How can I get a list of names of all sweeps including the ones which have not been run yet?

      Thank you for your help!

      All the best,
      Fabian

    • Taylor Robertson
      Ansys Employee

      Hello Fabian,

       

      This is a good question and after looking into this, I don't believe that there is a way to print the list of created unrun sweeps. All the scripts commands require you to know the names of the sweeps to query the properties you can set, but getsweepresult and getsweepdata do return the names of run sweeps. You may need to create the sweeps with a predetermined name; although runsweep with no argument does work to run all sweeps which would then allow you to get the names of the sweeps. If this is an important feature I would consider submitting afeature request-  IX.

       

      Best Regards,

       

    • fabian.ruf
      Subscriber

      Thanks, Taylor. Yes, that is exactly what I concluded as well. Running all sweeps is often to costly, so predetermined names are my only solution so far. 

      All the best,
      Fabian

Viewing 2 reply threads
  • The topic ‘How can I access sweeps from scripting/python?’ is closed to new replies.