Seems the ComponentGroup is failing, unless I am doing something wrong. Please check the code below and tell me if I am missing something. I used a recent 25.2 build.
from pyedb.generic.general_methods import generate_unique_folder_name
import pyedb.misc.downloads as downloads
import ansys.edb.core.database as database
from ansys.edb.core.session import launch_session
from ansys.edb.core.definition.component_def import ComponentDef
from ansys.edb.core.hierarchy.component_group import ComponentGroup
from ansys.edb.core.hierarchy.component_group import ComponentType
from ansys.edb.core.definition.component_pin import ComponentPin
base_path = r"C:\Program Files\AnsysEM\v252\Win64"
port = 50051
🔍 Before submitting the issue
🐞 Description of the bug
Seems the ComponentGroup is failing, unless I am doing something wrong. Please check the code below and tell me if I am missing something. I used a recent 25.2 build.
ComponentDef looks Ok
new_component = ComponentGroup.create(edb.top_circuit_cells[0].layout, compondent_def.name) new_component.component_type = ComponentType.RESISTOR
Also I can't access the ComponentProperty after
📝 Steps to reproduce
from pyedb.generic.general_methods import generate_unique_folder_name import pyedb.misc.downloads as downloads import ansys.edb.core.database as database from ansys.edb.core.session import launch_session from ansys.edb.core.definition.component_def import ComponentDef from ansys.edb.core.hierarchy.component_group import ComponentGroup from ansys.edb.core.hierarchy.component_group import ComponentType from ansys.edb.core.definition.component_pin import ComponentPin base_path = r"C:\Program Files\AnsysEM\v252\Win64" port = 50051
temp_folder = generate_unique_folder_name() targetfile = downloads.download_file("edb/ANSYS-HSD_V1.aedb", destination=temp_folder)
session = launch_session(base_path, port_num=port)
edb = database.Database.open(db_path=targetfile, read_only=False) compondent_def = ComponentDef.create(edb, "test", fp=None) pin1 = ComponentPin.create(compondent_def, "1") pin2 = ComponentPin.create(compondent_def, "2") new_component = ComponentGroup.create(edb.top_circuit_cells[0].layout, compondent_def.name) new_component.component_type = ComponentType.RESISTOR
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
No response
🐍 Which Python version are you using?
3.9
📦 Installed packages