Skip to content
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

ComponentGroup.add_member() failing #468

Open
2 tasks done
svandenb-dev opened this issue Nov 11, 2024 · 4 comments
Open
2 tasks done

ComponentGroup.add_member() failing #468

svandenb-dev opened this issue Nov 11, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@svandenb-dev
Copy link
Collaborator

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

I am creating a component
new_cmp = GrpcComponentGroup.create(self._active_layout, component_name, compdef.name)
Image

I got the padstackinstance
Image

Image

Did I missed something ?

📝 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
@svandenb-dev svandenb-dev added the bug Something isn't working label Nov 11, 2024
@chenchienjacklin
Copy link
Collaborator

@svandenb-dev here is how I add a member

psi = PadstackInstance.create(
    self._layout,
    net,
    pin_name,
    padstack_def,
    position[0],
    position[1],
    Value(0),
    layer,
    layer,
    None,
    None,
)
psi.is_layout_pin = True
ComponentPin.create(component_def, psi.name)
component.add_member(psi)

can you try adding line ComponentPin.create(component_def, psi.name) ?

@svandenb-dev
Copy link
Collaborator Author

Ah Ok I see I was not defining ComponentPin from a PadstackInstance.name. The documentation should explain this. The API allows creating ComponentPin from a randon string.
Thanks

@drewm102
Copy link
Collaborator

@svandenb-dev I believe this is the same way component pins are created/added to a component in the .NET API? I'm open to the idea of maybe automatically handling the step of creating the ComponentPin object, but do you think it would be better for that to be handled in the pyedb API since that is a high level wrapper around the pyedb-core API? Thanks!

@svandenb-dev
Copy link
Collaborator Author

@drewm102 I think this would need to be handled at the wrapping layer like you said. Adding the Components Pins is done at the definition level, so to my understanding ComponentPin should be create when we create the ComponentDefinition then we place pin "1", "2".... When we add the member the PadstackInstance will have to be renamed with the existing ComponentPin name. The code shown by @chenchienjacklin will assign the PadstackInstance name to all component sharing the same defintion, do you agree ?

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

No branches or pull requests

3 participants