-
-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b3358d
commit a761a8f
Showing
113 changed files
with
765 additions
and
1,078 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
# from Autodesk.Revit.DB import * | ||
# from Autodesk.Revit.DB.Architecture import * | ||
# from Autodesk.Revit.DB.Analysis import * | ||
# import Autodesk.Revit.UI | ||
|
||
uidoc = __revit__.ActiveUIDocument | ||
doc = __revit__.ActiveUIDocument.Document | ||
selection = list(__revit__.ActiveUIDocument.Selection.Elements) | ||
selection = [ doc.GetElement( elId ) for elId in __revit__.ActiveUIDocument.Selection.GetElementIds() ] | ||
|
||
total = 0.0 | ||
for i in selection: | ||
total += i.Parameter['Area'].AsDouble() | ||
total += i.LookupParameter('Area').AsDouble() | ||
print("TOTAL AREA OF ALL SELECTED ELEMENTS IS: {0}".format(total)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
# from Autodesk.Revit.DB import * | ||
# from Autodesk.Revit.DB.Architecture import * | ||
# from Autodesk.Revit.DB.Analysis import * | ||
# import Autodesk.Revit.UI | ||
|
||
uidoc = __revit__.ActiveUIDocument | ||
doc = __revit__.ActiveUIDocument.Document | ||
selection = list(__revit__.ActiveUIDocument.Selection.Elements) | ||
selection = [ doc.GetElement( elId ) for elId in __revit__.ActiveUIDocument.Selection.GetElementIds() ] | ||
|
||
total = 0.0 | ||
for i in selection: | ||
total += i.Parameter['Volume'].AsDouble() | ||
total += i.LookupParameter('Volume').AsDouble() | ||
print("TOTAL VOLUME OF ALL SELECTED ELEMENTS IS: {0}".format(total)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from Autodesk.Revit.DB import FilteredElementCollector, LinePatternElement | ||
|
||
uidoc = __revit__.ActiveUIDocument | ||
doc = __revit__.ActiveUIDocument.Document | ||
cl = FilteredElementCollector(doc).OfClass( LinePatternElement ) | ||
for i in cl: | ||
print( i.Name ) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from Autodesk.Revit.DB import FilteredElementCollector, FamilySymbol, Element, ElementType | ||
doc = __revit__.ActiveUIDocument.Document | ||
|
||
cl = FilteredElementCollector( doc ) | ||
list = cl.OfClass( ElementType ) | ||
|
||
for f in list: | ||
print( Element.Name.GetValue( f ), ElementType.FamilyName.GetValue( f )) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from Autodesk.Revit.DB import FilteredElementCollector, BuiltInCategory | ||
|
||
uidoc = __revit__.ActiveUIDocument | ||
doc = __revit__.ActiveUIDocument.Document | ||
selection = [ doc.GetElement( elId ) for elId in __revit__.ActiveUIDocument.Selection.GetElementIds() ] | ||
|
||
|
||
cl = FilteredElementCollector(doc) | ||
list = cl.OfCategory(BuiltInCategory.OST_Levels).WhereElementIsNotElementType() | ||
|
||
for i in list: | ||
print('Level ID:\t{1}\t\t\tName:\t{0}'.format(i.Name, i.Id.IntegerValue)) | ||
|
7 changes: 2 additions & 5 deletions
7
pyRevit/List_listScopeBoxes.py → pyRevit/DB_listScopeBoxes.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
__window__.Close() | ||
from Autodesk.Revit.DB import Transaction | ||
from Autodesk.Revit.DB import DetailElementOrderUtils as eo | ||
|
||
with Transaction(doc,"Bring Selected To Front") as t: | ||
uidoc = __revit__.ActiveUIDocument | ||
doc = __revit__.ActiveUIDocument.Document | ||
|
||
with Transaction( doc, 'Bring Selected To Front' ) as t: | ||
t.Start() | ||
for el in selection: | ||
eo.BringForward(doc, doc.ActiveView, el.Id) | ||
for elId in uidoc.Selection.GetElementIds(): | ||
try: | ||
eo.BringForward( doc, doc.ActiveView, elId ) | ||
except: | ||
continue | ||
t.Commit() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
__window__.Close() | ||
from Autodesk.Revit.DB import * | ||
# from Autodesk.Revit.DB.Architecture import * | ||
# from Autodesk.Revit.DB.Analysis import * | ||
# import Autodesk.Revit.UI | ||
from Autodesk.Revit.DB import Transaction, OverrideGraphicSettings | ||
|
||
uidoc = __revit__.ActiveUIDocument | ||
doc = __revit__.ActiveUIDocument.Document | ||
selection = list(__revit__.ActiveUIDocument.Selection.Elements) | ||
selection = __revit__.ActiveUIDocument.Selection.GetElementIds() | ||
|
||
with Transaction(doc,"Set Element Override") as t: | ||
with Transaction(doc, 'Reset Element Override') as t: | ||
t.Start() | ||
for el in selection: | ||
for elId in selection: | ||
ogs = OverrideGraphicSettings() | ||
doc.ActiveView.SetElementOverrides(el.Id, ogs) | ||
doc.ActiveView.SetElementOverrides( elId, ogs ) | ||
t.Commit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
__window__.Close() | ||
from Autodesk.Revit.DB import Transaction | ||
|
||
uidoc = __revit__.ActiveUIDocument | ||
doc = __revit__.ActiveUIDocument.Document | ||
|
||
__window__.Close() | ||
|
||
t = Transaction(doc, 'EQ dimensions') | ||
t.Start() | ||
|
||
for el in uidoc.Selection.Elements: | ||
for elId in uidoc.Selection.GetElementIds(): | ||
el = doc.GetElement( elId ) | ||
el.ValueOverride = 'EQ' | ||
|
||
t.Commit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
from Autodesk.Revit.DB import Transaction | ||
from Autodesk.Revit.DB import OverrideGraphicSettings | ||
from Autodesk.Revit.DB import LinePatternElement | ||
|
||
__window__.Close() | ||
from Autodesk.Revit.DB import Transaction, OverrideGraphicSettings, LinePatternElement | ||
|
||
doc = __revit__.ActiveUIDocument.Document | ||
selection = list(__revit__.ActiveUIDocument.Selection.Elements) | ||
selection = [ doc.GetElement( elId ) for elId in __revit__.ActiveUIDocument.Selection.GetElementIds() ] | ||
|
||
with Transaction(doc,"Set Element to Solid Projection Line Pattern") as t: | ||
t.Start() | ||
for el in selection: | ||
if el.ViewSpecific: | ||
ogs = OverrideGraphicSettings() | ||
ogs.SetProjectionLinePatternId( LinePatternElement.GetSolidPatternId() ) | ||
doc.ActiveView.SetElementOverrides(el.Id, ogs); | ||
doc.ActiveView.SetElementOverrides( el.Id, ogs ); | ||
t.Commit() |
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
pyRevit/Draft_whiteOutSelectedModelElementsInActiveView.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
__window__.Close() | ||
from Autodesk.Revit.DB import Transaction, OverrideGraphicSettings, LinePatternElement | ||
|
||
uidoc = __revit__.ActiveUIDocument | ||
doc = __revit__.ActiveUIDocument.Document | ||
selection = [ doc.GetElement( elId ) for elId in __revit__.ActiveUIDocument.Selection.GetElementIds() ] | ||
|
||
with Transaction(doc, 'Whiteout Selected Elements' ) as t: | ||
t.Start() | ||
for el in selection: | ||
if el.ViewSpecific: | ||
continue | ||
elif isinstance( el, Group ): | ||
for mem in el.GetMemberIds(): | ||
selection.append( doc.GetElement( mem )) | ||
ogs = OverrideGraphicSettings() | ||
ogs.SetProjectionLineColor( Color( 255,255,255 )) | ||
doc.ActiveView.SetElementOverrides( el.Id, ogs ); | ||
t.Commit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.