diff --git a/tools/adaptive-isogrid/src/nx/import_profile.py b/tools/adaptive-isogrid/src/nx/import_profile.py index 9f392ee8..e1491e17 100644 --- a/tools/adaptive-isogrid/src/nx/import_profile.py +++ b/tools/adaptive-isogrid/src/nx/import_profile.py @@ -95,14 +95,14 @@ def _find_or_create_sketch( if existing_sketch is not None: # Clear existing geometry for update try: - existing_sketch.Activate(NXOpen.Sketch.ViewReorient.DoNotOrientView) + existing_sketch.Activate(NXOpen.ViewReorient.FalseValue) all_geom = existing_sketch.GetAllGeometry() if all_geom: existing_sketch.DeleteObjects(list(all_geom)) lister.WriteLine(f"[import] Cleared {len(all_geom)} objects from existing sketch") existing_sketch.Deactivate( - NXOpen.Sketch.ViewReorient.DoNotOrientView, - NXOpen.Sketch.UpdateLevel.Model, + NXOpen.ViewReorient.FalseValue, + NXOpen.UpdateLevel.Model, ) except Exception as exc: lister.WriteLine(f"[import] Warning clearing sketch: {exc}") @@ -452,7 +452,8 @@ def main(): # Activate sketch for drawing try: - sketch.Activate(NXOpen.Sketch.ViewReorient.DoNotOrientView) + # NXOpen.ViewReorient: FalseValue = don't reorient, TrueValue = reorient + sketch.Activate(NXOpen.ViewReorient.FalseValue) except Exception as exc: lister.WriteLine(f"[import] ERROR activating sketch: {exc}") continue @@ -485,8 +486,8 @@ def main(): # Deactivate sketch try: sketch.Deactivate( - NXOpen.Sketch.ViewReorient.DoNotOrientView, - NXOpen.Sketch.UpdateLevel.Model, + NXOpen.ViewReorient.FalseValue, + NXOpen.UpdateLevel.Model, ) except Exception as exc: lister.WriteLine(f"[import] Warning deactivating: {exc}")