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):