ansys / pyedb-core

Ansys Electronics Database Python Client Package
https://edb.core.docs.pyansys.com/
MIT License
4 stars 2 forks source link

ComponentDef.add_model failing #469

Open svandenb-dev opened 2 weeks ago

svandenb-dev commented 2 weeks ago

🔍 Before submitting the issue

🐞 Description of the bug

I have a component definition with 2 pins Image

Then I defined SparameterModel n_port_model = GrpcSParameterModel.create(name=name, ref_net=reference_net) n_port_model.reference_file = file_path

Image

Image

📝 Steps to reproduce

NA

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

NA

🐍 Which Python version are you using?

3.11

📦 Installed packages

NA
chenchienjacklin commented 2 weeks ago

@svandenb-dev Is this what you are looking for?

Database.delete(EDB_PATH)
db = Database.create(EDB_PATH)
cell = Cell.create(db, CellType.CIRCUIT_CELL, "main")
layout = cell.layout
component_def = ComponentDef.create(db, "ComponentDef1", None)
component = ComponentGroup.create(layout, "ComponentGroup1", component_def.name)
component.component_type = ComponentType.RESISTOR
sparam_model = SParameterModel.create("SParamModel1", "ref_net")
component_property = component.component_property
component_property.model = sparam_model
component.component_property = component_property

Image