Skip to content

Commit bcf72d3

Browse files
committed
2620#discussion_r2020111835 - added suggested change
2620#discussion_r2020111832 - added suggested change
1 parent 85eb9ad commit bcf72d3

File tree

1 file changed

+4
-1
lines changed
  • extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/3D.pulldown/Orient View To Face.pushbutton

1 file changed

+4
-1
lines changed

extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/3D.pulldown/Orient View To Face.pushbutton/script.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ def reorient(view):
4444
# orient the 3D view looking at the sketchplane
4545
view.OrientTo(norm.Negate())
4646
# set the sketchplane to active
47-
revit.uidoc.ActiveView.SketchPlane = sp
47+
view.SketchPlane = sp
4848

4949
revit.uidoc.RefreshActiveView()
5050

51+
except OperationCanceledException:
52+
pass
53+
5154
except Exception as ex:
5255
forms.alert("Error: {0}".format(str(ex)))
5356

0 commit comments

Comments
 (0)