From 0c0af4b3e694212d13190854e5c73f1118714353 Mon Sep 17 00:00:00 2001 From: amruta3991 <105887554+amruta3991@users.noreply.github.com> Date: Wed, 7 Feb 2024 09:07:32 -0700 Subject: [PATCH] FEATURE: Support null footprints from component def (#349) Co-authored-by: drewm102 <103221973+drewm102@users.noreply.github.com> --- src/ansys/edb/core/definition/component_def.py | 2 +- src/ansys/edb/core/inner/messages.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ansys/edb/core/definition/component_def.py b/src/ansys/edb/core/definition/component_def.py index 3ef8ac4cb2..536ce76aab 100644 --- a/src/ansys/edb/core/definition/component_def.py +++ b/src/ansys/edb/core/definition/component_def.py @@ -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 ` - Footprint cell of the component definition. + Footprint cell of the component definition, optional Returns ------- diff --git a/src/ansys/edb/core/inner/messages.py b/src/ansys/edb/core/inner/messages.py index c1ba847ded..7b2224a96f 100644 --- a/src/ansys/edb/core/inner/messages.py +++ b/src/ansys/edb/core/inner/messages.py @@ -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):