Skip to content

Commit

Permalink
FEATURE: Support null footprints from component def (#349)
Browse files Browse the repository at this point in the history
Co-authored-by: drewm102 <[email protected]>
  • Loading branch information
amruta3991 and drewm102 committed Feb 7, 2024
1 parent 4964d8e commit 0c0af4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ansys/edb/core/definition/component_def.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def create(cls, db, comp_def_name, fp):
comp_def_name : str
Name of the component definition to create.
fp : :class:`Cell <ansys.edb.core.layout.Cell>`
Footprint cell of the component definition.
Footprint cell of the component definition, optional
Returns
-------
Expand Down
5 changes: 4 additions & 1 deletion src/ansys/edb/core/inner/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,10 @@ def inst_array_creation_message(layout, name, ref, orig, xaxis, yaxis, xcount, y

def component_def_creation_message(db, comp_name, fp):
"""Convert to a ``ComponentDefCreateMessage`` object."""
return ComponentDefCreateMessage(db=db.msg, comp_name=comp_name, fp=fp.msg)
if fp is None:
return ComponentDefCreateMessage(db=db.msg, comp_name=comp_name, fp=None)
else:
return ComponentDefCreateMessage(db=db.msg, comp_name=comp_name, fp=fp.msg)


def transform_message(transform):
Expand Down

0 comments on commit 0c0af4b

Please sign in to comment.