Skip to content

FIX: Enhance capacitor creation with name parameter and refresh IDs - #7516

Merged
Samuelopez-ansys merged 4 commits into
mainfrom
fix/issue_with_components
Apr 8, 2026
Merged

Samuelopez-ansys merged 4 commits into
mainfrom
fix/issue_with_components

Conversation

@Samuelopez-ansys

Copy link
Copy Markdown
Member

Description

This pull request introduces a minor fix to how IDs are assigned to circuit primitives and updates a related test to ensure correct behavior when creating capacitors with custom names.

Improvements to ID assignment:

  • Updated the assignment of the id attribute in refresh_all_ids in primitives_circuit.py to handle cases where the name is not a number, assigning the value directly instead of converting to int. This makes the code more robust to non-numeric IDs.

It was found running this example:
ansys/pyaedt-examples#555

Issue linked

Please mention the issue number or describe the problem this pull request addresses.

Checklist

  • I have tested my changes locally.
  • I have added necessary documentation or updated existing documentation.
  • I have followed the coding style guidelines of this project.
  • I have added appropriate tests (unit, integration, system).
  • I have reviewed my changes before submitting this pull request.
  • I have linked the issue or issues that are solved by the PR if any.
  • I have agreed with the Contributor License Agreement (CLA).

@Samuelopez-ansys
Samuelopez-ansys requested a review from a team as a code owner April 8, 2026 12:53
@github-actions github-actions Bot added the bug Something isn't working label Apr 8, 2026
@Samuelopez-ansys
Samuelopez-ansys merged commit 607495d into main Apr 8, 2026
49 checks passed
@Samuelopez-ansys
Samuelopez-ansys deleted the fix/issue_with_components branch April 8, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants