Skip to content

Commit 27901bd

Browse files
committed
follow code lowercase
1 parent ce3a632 commit 27901bd

File tree

1 file changed

+29
-23
lines changed
  • RevitPythonShell/DefaultConfig

1 file changed

+29
-23
lines changed

RevitPythonShell/DefaultConfig/init.py

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def quit():
2020
exit = quit
2121

2222

23-
def get_selected_elements(doc):
23+
def getSelectedElements(doc):
2424
"""API change in Revit 2016 makes old method throw an error"""
2525
try:
2626
# Revit 2016
@@ -60,18 +60,20 @@ def __init__(self, uiApplication):
6060
import RevitLookup
6161
self.RevitLookup = RevitLookup
6262

63-
def IsInstalled(self):
63+
def isInstalled(self):
6464
if not self.RevitLookup:
6565
print('RevitLookup not installed. Visit https://github.com/jeremytammik/RevitLookup to install.')
6666
return False
6767
return True
6868

69-
def SnoopCurrentSelection(self):
70-
if self.IsInstalled()== True:
69+
def snoopCurrentSelection(self):
70+
if self.isInstalled():
7171
form = self.RevitLookup.Views.ObjectsView()
7272
form.SnoopAndShow(self.RevitLookup.Core.Selector.SnoopCurrentSelection)
73-
def SnoopElement(self,element):
74-
if self.IsInstalled()== True:
73+
74+
def snoopElement(self,
75+
element):
76+
if self.isInstalled():
7577
if element is None:
7678
print("element null object, Please input element to snoop")
7779
return
@@ -83,14 +85,18 @@ def SnoopElement(self,element):
8385
elementSet = ElementSet()
8486
for e in element:
8587
elementSet.Insert(e)
86-
element = elementSet
88+
form = self.RevitLookup.Views.ObjectsView(elementSet)
89+
self.RevitLookup.Core.ModelessWindowFactory.Show(form)
90+
pass
8791
form = self.RevitLookup.Views.ObjectsView(element)
8892
self.RevitLookup.Core.ModelessWindowFactory.Show(form)
89-
def SnoopActiveView():
90-
if self.IsInstalled()== True:
91-
self.SnoopElement(doc.ActiveView)
92-
def SnoopDB(self):
93-
if self.IsInstalled()== True:
93+
94+
def snoopActiveView():
95+
if self.isInstalled():
96+
self.snoopElement(doc.ActiveView)
97+
98+
def snoopDB(self):
99+
if self.isInstalled():
94100
form = self.RevitLookup.Views.ObjectsView()
95101
form.SnoopAndShow(self.RevitLookup.Core.Selector.SnoopDb)
96102

@@ -99,20 +105,20 @@ def SnoopDB(self):
99105

100106

101107

102-
def SnoopCurrentSelection():
103-
_revitlookup.SnoopCurrentSelection()
108+
def snoopCurrentSelection():
109+
_revitlookup.snoopCurrentSelection()
104110
'''
105111
## Example :
106-
## _revitlookup.SnoopElement(doc.ActiveView)
107-
## _revitlookup.SnoopElement(959510)
108-
## _revitlookup.SnoopElement(doc.ActiveView.Id)
112+
## _revitlookup.snoopElement(doc.ActiveView)
113+
## _revitlookup.snoopElement(959510)
114+
## _revitlookup.snoopElement(doc.ActiveView.Id)
109115
'''
110-
def SnoopElement(element):
111-
_revitlookup.SnoopElement(element)
112-
def SnoopActiveView():
113-
_revitlookup.SnoopActiveView()
114-
def SnoopDB():
115-
_revitlookup.SnoopDB()
116+
def snoopElement(element):
117+
_revitlookup.snoopElement(element)
118+
def snoopActiveView():
119+
_revitlookup.snoopActiveView()
120+
def snoopDB():
121+
_revitlookup.snoopDB()
116122
# ------------------------------------------------------------------------------
117123

118124

0 commit comments

Comments
 (0)