How to access AEDT API methods not implemented in PyAEDT?

Samuel Lopez
Samuel Lopez Member, Employee Posts: 22
5 Answers 10 Comments First Anniversary Ansys Employee
✭✭✭✭

For example, to capture the variables in the derivative study:


There is an AEDT API method to get these variables:

oProject = oDesktop.GetActiveProject()
oDesign = oProject.GetActiveDesign()
oModule = oDesign.GetModule("AnalysisSetup")
variables = oModule.GetDerivativeVariables("Setup1")

How could I use this method using PyAEDT?

Best Answer

  • Samuel Lopez
    Samuel Lopez Member, Employee Posts: 22
    5 Answers 10 Comments First Anniversary Ansys Employee
    ✭✭✭✭
    edited December 2022 Answer ✓

    If there is an AEDT API method not implemented in PyAEDT, please submit an issue in GitHub, and PyAEDT contributors will add it:

    https://github.com/pyansys/pyaedt/issues

    In the meanwhile, you can combine PyAEDT methods with AEDT API methods in a hybrid way. For instance, in this case:

    app = Hfss()
    oModule = app.odesign.GetModule("AnalysisSetup")
    derivatives = oModule.GetDerivativeVariables("Setup1")
    

    In the next table, there are some interesting equivalences: