ansys / pyedb-core

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

Fail adding SparameterModel to ComponenentDef #452

Closed svandenb-dev closed 1 month ago

svandenb-dev commented 1 month ago

🔍 Before submitting the issue

🐞 Description of the bug

n_port_model = GrpcSParameterModel.create(name=name, ref_net=reference_net)
n_port_model.reference_file = file_path

image image

self.component_def.add_component_model(n_port_model)

image

📝 Steps to reproduce

NA

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

No response

🐍 Which Python version are you using?

3.11

📦 Installed packages

NA
drewm102 commented 1 month ago

@svandenb-dev You should be using NPortComponentModel from the module ansys.edb.core.definition.component_model. SParameterModel objects are supposed to be set on ComponentProperty objects of ComponentGroup objects. Switching the object to a NPortComponentModel resolves the issue.