Export local variables from existing AEDT project
Ansys Staff
Member, Employee Posts: 24
✭✭✭✭
In an existing Ansys Electronic Desktop project, I have defined a list of variables (Design Properties > Local Variales). I want to export the variables and the values, so I can reuse them in a Python script with AEDTLib. How can I do that?
Tagged:
0
Best Answers
-
Open the IronPython command window from Tools > Open Command Window.
p = oDesktop.GetActiveProject() d = p.GetActiveDesign() vars = d.GetVariables() for v in vars: print (v, d.GetVariableValue(v))
This should list all defined local variables like this:
('Stator_OD', '1800mm') ('Rotor_OD', '1510mm') ...
4 -
With PyAEDT, you can access this data with the variable_manager:
aedtapp = Hfss() aedtapp.variable_manager
2