Skip to content

Commit 3038ca5

Browse files
author
f.beaupere
committed
first element convenience variable added
1 parent 776286b commit 3038ca5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

RevitPythonShell/init.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ def get_selected_elements(doc):
3030
# old method
3131
return list(__revit__.ActiveUIDocument.Selection.Elements)
3232
selection = get_selected_elements(doc)
33-
33+
# convenience variable for first element in selection
34+
if len(selection):
35+
s0 = selection[0]
3436

3537
#------------------------------------------------------------------------------
3638
import clr

0 commit comments

Comments
 (0)