ansys / ansys/pyedb-core

Spice model not assigned

Open
#556 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
7
Forks
4
PR merge metrics
No merged PRs in 30d

Description

### 🔍 Before submitting the issue

- [x] I have searched among the existing issues
- [x] I am using a Python virtual environment

### 🐞 Description of the bug

I may have found a bug with Spice model assignement.

```python
spice_mod = GrpcSPICEModel.create(name=modelname, path=modelpath, sub_circuit=f"{modelname}_sub")
terminal = 1
for pn in pin_names:
spice_mod.add_terminal(terminal=str(terminal), pin=pn)
terminal += 1
comp_property = component.component_property
comp_property.model = spice_mod
component.component_property = comp_property
```

The Spice model seems to be properly assigned

![Image](https://github.com/user-attachments/assets/661e42ac-221b-42e5-bb9f-da61f5306be9)

But with staying in the same evaluation window if I cast the same component the model is PinPair

![Image](https://github.com/user-attachments/assets/1dcaee6a-c081-4b21-98cd-aa35b7c4be2c)

I wonder if there is an issue between client/server and caching.

### 📝 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.9

### 📦 Installed packages

```shell
NA
```

Contributor guide

Open the contributing guide

Research direction

No source files or reproduction steps are provided. Start by tracing GrpcSPICEModel.create, add_terminal, and the component_property.model assignment, then compare the model before and after casting in the same evaluation window. Done means the component retains the assigned Spice model instead of appearing as PinPair.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.