-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEAT: get the path of a circuit component #5598
base: main
Are you sure you want to change the base?
Conversation
Thanks for opening a Pull Request. If you want to perform a review write a comment saying: @ansys-reviewer-bot review |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5598 +/- ##
==========================================
+ Coverage 85.25% 85.27% +0.01%
==========================================
Files 152 152
Lines 60944 60957 +13
==========================================
+ Hits 51960 51980 +20
+ Misses 8984 8977 -7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gkorompi thanks for the contribution !
I'm not sure about the specific location that you are hard coding.
Are you sure this information will be here for every cases ? When going around pyaedt code sources, I found cases where "NAME:CosimDefinition"
was first in the list but the 12th element wasn't a list (so couldn't be caught through [1]
).
If I'm wrong and the 12th element is correct, is this place the same for every version of AEDT? If not, could you update the code ?
for i in self._circuit_components.o_component_manager.GetData(component_definition): | ||
if type(i) == list and type(i[0]) == str: | ||
if i[0] == "NAME:CosimDefinitions": | ||
return (i[1][12][1].split(" ")[1])[1:-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gkorompi are you sure that the information you are looking for is always in the same location [1][12][1]?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right @gmalinve i will implement it for all cases. Thanks
@gkorompi I left a couple of comments but I'd handle the property in a different way. Something like:
be sure that what you are lloking for is always in this same location: data[1][12][1]. |
Description
Retrieve the path of a Circuit component, specifically spice imported spice models etc.
Issue linked
Please mention the issue number or describe the problem this pull request addresses.
Checklist