diff --git a/src/ansys/aedt/core/icepak.py b/src/ansys/aedt/core/icepak.py index 618ffa9ea2c..686dbc92458 100644 --- a/src/ansys/aedt/core/icepak.py +++ b/src/ansys/aedt/core/icepak.py @@ -961,7 +961,7 @@ def assign_surface_monitor(self, face_name, monitor_type="Temperature", monitor_ >>> icepak.assign_surface_monitor("Surface1", monitor_name="monitor") 'monitor' """ - return self._monitor.assign_surface_monitor(face_name, monitor_quantity=monitor_type, monitor_name=monitor_name) + return self.monitor.assign_surface_monitor(face_name, monitor_quantity=monitor_type, monitor_name=monitor_name) @pyaedt_function_handler() def assign_point_monitor(self, point_position, monitor_type="Temperature", monitor_name=None): @@ -994,7 +994,7 @@ def assign_point_monitor(self, point_position, monitor_type="Temperature", monit 'monitor1' """ - return self._monitor.assign_point_monitor( + return self.monitor.assign_point_monitor( point_position, monitor_quantity=monitor_type, monitor_name=monitor_name ) @@ -1031,7 +1031,7 @@ def assign_point_monitor_in_object(self, name, monitor_type="Temperature", monit >>> icepak.assign_point_monitor(box.name, monitor_name="monitor2") "'monitor2' """ - return self._monitor.assign_point_monitor_in_object( + return self.monitor.assign_point_monitor_in_object( name, monitor_quantity=monitor_type, monitor_name=monitor_name ) diff --git a/src/ansys/aedt/core/modeler/cad/elements_3d.py b/src/ansys/aedt/core/modeler/cad/elements_3d.py index 19735a69aa5..8c3f1e798aa 100644 --- a/src/ansys/aedt/core/modeler/cad/elements_3d.py +++ b/src/ansys/aedt/core/modeler/cad/elements_3d.py @@ -1451,10 +1451,7 @@ def properties(self): props = _get_data_model(self.child_object) for p in self.child_object.GetPropNames(): - if p in props: - self._props[p] = props[p] - else: - self._props[p] = None + self._props[p] = props.get(p, None) except Exception: for p in self.child_object.GetPropNames(): try: diff --git a/src/ansys/aedt/core/modules/mesh.py b/src/ansys/aedt/core/modules/mesh.py index 19c54c21dca..1c0726350a5 100644 --- a/src/ansys/aedt/core/modules/mesh.py +++ b/src/ansys/aedt/core/modules/mesh.py @@ -1177,9 +1177,13 @@ def assign_length_mesh(self, assignment, inside_selection=True, maximum_length=1 mop = MeshOperation(self, name, props, "LengthBased") for meshop in self.meshoperations[:]: - if meshop.name == mop.name: - meshop.delete() - break + try: + if meshop.name == mop.name: + meshop.delete() + break + # Handle case where mop has no child_object + except AttributeError: + continue mop.create() self.meshoperations.append(mop) return mop