Skip to content

In Circuit, is there a way to copy a top-level design and paste the cell as a subcircuit in another design? #3662

Closed Answered by pyAnsysUser
pyAnsysUser asked this question in Q&A
Discussion options

You must be logged in to vote

well, before I asked this question, I did not know about gRPC; with this, it is trivial:

circuit_test_project_path = r'Circuit_Project\data\test_copy\copy_test.aedt'
first_parent = 'the_first_parent'
second_parent = 'the_second_parent'
child_for_copy = 'the_child'

with pyaedt.Circuit(projectname=circuit_test_project_path, designname=first_parent, non_graphical=False) as cir:
    cir.insert_design(second_parent)
    cir.insert_design(child_for_copy)

    cir.oproject.CopyDesign(child_for_copy)
    cir.set_active_design(first_parent)
    cir.odesign.PasteDesign(0)
    cir.set_active_design(second_parent)
    cir.odesign.PasteDesign(0)
    cir.save_project()
    cir.close_desktop()

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pyAnsysUser
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