From e6f09c5557ae3d7084334e06449c305b66be9f24 Mon Sep 17 00:00:00 2001 From: svandenb-dev Date: Wed, 30 Oct 2024 11:23:15 +0100 Subject: [PATCH] test #98 --- src/pyedb/grpc/edb_core/padstack.py | 31 ++++++++++--------- .../edb_core/primitive/padstack_instances.py | 2 +- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/pyedb/grpc/edb_core/padstack.py b/src/pyedb/grpc/edb_core/padstack.py index 8cb64ef749..7a77d89ce6 100644 --- a/src/pyedb/grpc/edb_core/padstack.py +++ b/src/pyedb/grpc/edb_core/padstack.py @@ -1008,10 +1008,10 @@ def place( ------- :class:`dotnet.edb_core.edb_data.padstacks_data.EDBPadstackInstance` """ - padstack = None + padstack_def = None for pad in list(self.definitions.keys()): if pad == definition_name: - padstack = self.definitions[pad] + padstack_def = self.definitions[pad] position = GrpcPointData(position) net = self._pedb.nets.find_or_create_net(net_name) rotation = GrpcValue(rotation * math.pi / 180) @@ -1034,21 +1034,24 @@ def place( tolayer = sign_layers_values[tolayer] if solderlayer: solderlayer = sign_layers_values[solderlayer] - if padstack: + if not via_name: + via_name = generate_unique_name(padstack_def.name) + if padstack_def: padstack_instance = PadstackInstance.create( - self._active_layout, - net, - via_name, - padstack, - position, - rotation, - fromlayer, - tolayer, - solderlayer, - None, + layout=self._active_layout, + net=net, + name=via_name, + padstack_def=padstack_def, + position_x=position.x, + position_y=position.y, + rotation=rotation, + top_layer=fromlayer, + bottom_layer=tolayer, + solder_ball_layer=solderlayer, + layer_map=None, ) padstack_instance.is_layout_pin = is_pin - return PadstackInstance(self._pedb, padstack_instance._edb_object) + return PadstackInstance(self._pedb, padstack_instance) else: return False diff --git a/src/pyedb/grpc/edb_core/primitive/padstack_instances.py b/src/pyedb/grpc/edb_core/primitive/padstack_instances.py index 67bcfc467f..de44e8b3c0 100644 --- a/src/pyedb/grpc/edb_core/primitive/padstack_instances.py +++ b/src/pyedb/grpc/edb_core/primitive/padstack_instances.py @@ -181,7 +181,7 @@ def _em_properties(self): r"$end 'EM properties'\n" ) - _, p = self.get_product_property(ProductIdType.DESIGNER, 18, "") + p = self.get_product_property(ProductIdType.DESIGNER, 18) if p: return p else: