-
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fixed host adder and added 2020.2.3 * added 2020.1.1 to hosts * Add tool to list titleblocks on sheets for review. Co-authored-by: Ehsan Iran-Nejad <eirannejad@gmail.com>
- Loading branch information
1 parent
581952f
commit 53f2c38
Showing
4 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...t.tab/Drawing Set.panel/Sheets.pulldown/List TitleBlocks on Sheets.pushbutton/bundle.yaml
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 @@ | ||
tooltip: Lists title blocks on selected sheets for review |
Binary file added
BIN
+1.74 KB
...rawing Set.panel/Sheets.pulldown/List TitleBlocks on Sheets.pushbutton/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions
30
...vit.tab/Drawing Set.panel/Sheets.pulldown/List TitleBlocks on Sheets.pushbutton/script.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,30 @@ | ||
"""Select title blocks on selected sheets for batch editing.""" | ||
|
||
from pyrevit import coreutils | ||
from pyrevit import revit, DB | ||
from pyrevit import forms | ||
from pyrevit import script | ||
|
||
output = script.get_output() | ||
logger = script.get_logger() | ||
|
||
|
||
def get_source_sheets(): | ||
sheet_elements = forms.select_sheets(button_name='Select TitleBlocks', | ||
use_selection=True, | ||
include_placeholder=False) | ||
if not sheet_elements: | ||
script.exit() | ||
return sheet_elements | ||
|
||
|
||
def print_titleblocks(sheets): | ||
for sheet in sheets: | ||
tblocks = revit.query.get_sheet_tblocks(sheet) | ||
for tblock in tblocks: | ||
print('SHEET: {0} - {1}\t\tTITLEBLOCK: {2} {3}'.format(sheet.SheetNumber, sheet.Name, tblock.Name, output.linkify(tblock.Id))) | ||
|
||
|
||
# orchestrate | ||
sheets = get_source_sheets() | ||
tblocks = print_titleblocks(sheets) |
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