Skip to content

peristence of pyaedt session through iterations #4670

Closed Answered by Samuelopez-ansys
gkorompi asked this question in Q&A
Discussion options

You must be logged in to vote

@gkorompi But why do not simply create the pyaedt object at the beginning? I need more context because I would first create the pyaedt object:

import pyaedt
import pandas as pd
hfss = pyaedt.Hfss(path)

Then:

def test(var):
  
    object_names = [*hfss.modeler.objects_by_name.keys()]
    for i in object_names:
        # do your things

and there you can call the method.

test(1)

test(2)

....

hfss.release_desktop()

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

gkorompi
May 14, 2024
Collaborator Author

You must be logged in to vote
1 reply
@Samuelopez-ansys
Comment options

Answer selected by gkorompi
Comment options

gkorompi
May 14, 2024
Collaborator Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants