Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion dev/pyRevitWPFForms/pyRevitWPFForms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
<Page Include="$(PyRevitExtDir)\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Sheets.pulldown\Batch Sheet Maker.pushbutton\BatchSheetMakerWindow.xaml" Link="Tools\BatchSheetMakerWindow.xaml" />
<Page Include="$(PyRevitExtDir)\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Sheets.pulldown\ReOrder Sheets.pushbutton\ReOrderWindow.xaml" Link="Tools\ReOrderWindow.xaml" />
<Page Include="$(PyRevitExtDir)\pyRevitTools.extension\pyRevit.tab\Modify.panel\edit1.stack\Match.splitpushbutton\Match.pushbutton\MatchConfigWindow.xaml" Link="Tools\MatchConfigWindow.xaml" />
<Page Include="$(PyRevitExtDir)\pyRevitTools.extension\pyRevit.tab\Modify.panel\edit1.stack\Match.splitpushbutton\Match.pushbutton\MatchConfigWindowLegacy.xaml" Link="Tools\MatchConfigWindowLegacy.xaml" />
<Page Include="$(PyRevitExtDir)\pyRevitTools.extension\pyRevit.tab\Modify.panel\edit1.stack\Patterns.splitpushbutton\Make Pattern.pushbutton\MakePatternWindow.xaml" Link="Tools\MakePatternWindow.xaml" />
<Page Include="$(PyRevitExtDir)\pyRevitTools.extension\pyRevit.tab\Modify.panel\edit2.stack\ReValue.pushbutton\ReValueWindow.xaml" Link="Tools\ReValueWindow.xaml" />
<Page Include="$(PyRevitExtDir)\pyRevitTools.extension\pyRevit.tab\Modify.panel\edit3.stack\Edit.pulldown\Convert Line Styles.pushbutton\ConvertLineStyles.xaml" Link="Tools\ConvertLineStyles.xaml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ title: Test DynamoBIM
tooltip: Balloon test for DynamoBIM, Shift + Click to Test Script set to Auto Execute, add your scripts to the trusted locations or disable the warning in the settings.
author: "{{author}}"
highlight: new
min_revit_version: '2019'
max_revit_version: '2022'
references:
engine:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ title:
help_url: https://www.youtube.com/channel/UC-0THIvKRd6n7T2a5aKYaGg
author: Test User
context: zero-doc
min_revit_version: 2019
tooltips:
de_de: Panelanzeigeoptionen und Debug-Einstellungen konfigurieren
ru: Настроить опции отображения панели и настройки отладки
Expand Down
15 changes: 4 additions & 11 deletions extensions/pyRevitTags.extension/lib/tagsmgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#pylint: disable=E0401,C0111,W0603,C0103
from collections import namedtuple

from pyrevit import HOST_APP
from pyrevit import PyRevitException
from pyrevit.coreutils import pyutils
from pyrevit.coreutils import logger
Expand Down Expand Up @@ -35,18 +34,12 @@
DB.BuiltInCategory.OST_DSR_CenterlineTickMarkStyleId,
DB.BuiltInCategory.OST_DSR_CenterlinePatternCatId,
DB.BuiltInCategory.OST_CenterLines,
DB.BuiltInCategory.OST_StairsSketchLandingCenterLines
DB.BuiltInCategory.OST_StairsSketchLandingCenterLines,
DB.BuiltInCategory.OST_FabricationContainmentCenterLine,
DB.BuiltInCategory.OST_FabricationPipeworkCenterLine,
DB.BuiltInCategory.OST_FabricationDuctworkCenterLine,
]

if HOST_APP.is_newer_than(2016):
SCOPE_SKIP_CATEGORIES.extend(
[
DB.BuiltInCategory.OST_FabricationContainmentCenterLine,
DB.BuiltInCategory.OST_FabricationPipeworkCenterLine,
DB.BuiltInCategory.OST_FabricationDuctworkCenterLine,
]
)


ApplyTagsConfig = namedtuple('ApplyTagsConfig', ['append', 'circuits'])
"""namedtuple for configuring the behaviour of :func:`apply_tags`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,24 +237,6 @@ def make_schedule(self, sender, args):
'selected tag.'
.format(catname=tag_cat.Name))
return
if HOST_APP.is_newer_than(2020, or_equal=True):
sch = \
forms.SelectFromList.show(
cat_schedules,
name_attr='Name',
title='Select Schedule',
button_name='Select Schedule',
width=400, height=300
)
else:
sch = \
forms.SelectFromList.show(
cat_schedules,
name_attr='ViewName',
title='Select Schedule',
button_name='Select Schedule',
width=400, height=300
)

tag_sched = \
forms.SelectFromList.show(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -946,18 +946,10 @@ def _setup_ui(self):
"apply_foreground_pattern_color", True
)

if HOST_APP.is_newer_than(2019, or_equal=True):
self._chk_background_pattern.IsChecked = self._config.get_option(
"apply_background_pattern_color", False
)
self._chk_background_pattern.IsEnabled = True
else:
self._chk_background_pattern.IsChecked = False
self._chk_background_pattern.IsEnabled = False
bg_pattern_text = self.get_locale_string(
"ColorSplasher.Checkboxes.ApplyBackgroundPattern.RequiresRevit2019"
)
self._chk_background_pattern.Content = bg_pattern_text
self._chk_background_pattern.IsChecked = self._config.get_option(
"apply_background_pattern_color", False
)
self._chk_background_pattern.IsEnabled = True

self.list_box2.SelectionChanged += self.list_selected_index_changed
self.list_box2.MouseDown += self.list_box2_mouse_down
Expand Down Expand Up @@ -1029,10 +1021,9 @@ def checkbox_changed(self, sender, e):
self._config.set_option(
"apply_foreground_pattern_color", self._chk_foreground_pattern.IsChecked
)
if HOST_APP.is_newer_than(2019, or_equal=True):
self._config.set_option(
"apply_background_pattern_color", self._chk_background_pattern.IsChecked
)
self._config.set_option(
"apply_background_pattern_color", self._chk_background_pattern.IsChecked
)
pyrevit_script.save_config()

def button_click_set_colors(self, sender, e):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ author: >-
Ehsan Iran-Nejad (Original Author)

Tay Othman (Maintainer + UI)
min_revit_version: 2014
tooltip:
de_de: >-
Bauelementschlüssel vom Projekt verwalten.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@
INDEX_FORMAT = '{{:0{digits}}}'


EXPORT_ENCODING = 'utf_16_le'
if HOST_APP.is_newer_than(2020):
EXPORT_ENCODING = 'utf_8'
EXPORT_ENCODING = 'utf_8'

IS_REVIT_2022_OR_NEWER = HOST_APP.is_newer_than(2021)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyrevit import revit, DB, UI, HOST_APP
from pyrevit import revit, DB
from pyrevit import forms
from pyrevit import script

Expand Down Expand Up @@ -40,14 +40,10 @@ def update_if_placed(vport, exst_vps):

# get a list of viewports to be copied, updated
if selected_sheets and len(selected_sheets) > 0:
if int(HOST_APP.version) > 2014:
cursheet = revit.uidoc.ActiveGraphicalView
for v in selected_sheets:
if cursheet.Id == v.Id:
selected_sheets.remove(v)
else:
cursheet = selected_sheets[0]
selected_sheets.remove(cursheet)
cursheet = revit.uidoc.ActiveGraphicalView
for v in selected_sheets:
if cursheet.Id == v.Id:
selected_sheets.remove(v)

revit.uidoc.ActiveView = cursheet
selected_vps = revit.pick_elements()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Lists views based on a search option."""

from pyrevit import HOST_APP
from pyrevit import revit, DB
from pyrevit import script
from pyrevit import forms
Expand All @@ -22,41 +21,27 @@ def elementid_has_value(p):
def find_views_with_underlay(invert=False):
for v in views:
try:
if HOST_APP.is_newer_than(2016, or_equal=True):
base_underlay_param = \
v.Parameter[DB.BuiltInParameter.VIEW_UNDERLAY_BOTTOM_ID]
top_underlay_param = \
v.Parameter[DB.BuiltInParameter.VIEW_UNDERLAY_TOP_ID]
if (base_underlay_param \
and top_underlay_param \
and elementid_has_value(base_underlay_param) \
and elementid_has_value(top_underlay_param)
) != invert:
print('TYPE: {1}\n'
'ID: {2}\n'
'TEMPLATE: {3}\n'
'UNDERLAY (BASE): {4}\n'
'UNDERLAY (TOP): {5}\n'
'{0}\n\n'
.format(revit.query.get_name(v),
str(v.ViewType).ljust(20),
output.linkify(v.Id),
str(v.IsTemplate).ljust(10),
base_underlay_param.AsValueString().ljust(25),
top_underlay_param.AsValueString().ljust(25)))
else:
underlayp = v.Parameter[DB.BuiltInParameter.VIEW_UNDERLAY_ID]
if (underlayp and elementid_has_value(underlayp)
base_underlay_param = \
v.Parameter[DB.BuiltInParameter.VIEW_UNDERLAY_BOTTOM_ID]
top_underlay_param = \
v.Parameter[DB.BuiltInParameter.VIEW_UNDERLAY_TOP_ID]
if (base_underlay_param \
and top_underlay_param \
and elementid_has_value(base_underlay_param) \
and elementid_has_value(top_underlay_param)
) != invert:
print('TYPE: {1}\n'
'ID: {2}\n'
'TEMPLATE: {3}\n'
'UNDERLAY: {4}\n'
'{0}\n\n'.format(revit.query.get_name(v),
str(v.ViewType).ljust(20),
output.linkify(v.Id),
str(v.IsTemplate).ljust(10),
underlayp.AsValueString().ljust(25)))
print('TYPE: {1}\n'
'ID: {2}\n'
'TEMPLATE: {3}\n'
'UNDERLAY (BASE): {4}\n'
'UNDERLAY (TOP): {5}\n'
'{0}\n\n'
.format(revit.query.get_name(v),
str(v.ViewType).ljust(20),
output.linkify(v.Id),
str(v.IsTemplate).ljust(10),
base_underlay_param.AsValueString().ljust(25),
top_underlay_param.AsValueString().ljust(25)))
print("\n\n")
except Exception:
continue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# http://dp-stuff.org/revit-view-underlay-property-python-problem/


from pyrevit import HOST_APP
from pyrevit import revit, DB
from pyrevit import forms
from pyrevit.compat import get_elementid_value_func
Expand All @@ -20,12 +19,4 @@
if get_elementid_value(view.Category.Id) == \
int(DB.BuiltInCategory.OST_Views) \
and (view.CanBePrinted):
if HOST_APP.is_newer_than(2016):
view.SetUnderlayRange(DB.ElementId.InvalidElementId, DB.ElementId.InvalidElementId)
else:
p = view.get_Parameter(
DB.BuiltInParameter.VIEW_UNDERLAY_ID
)

if p is not None:
p.Set(DB.ElementId.InvalidElementId)
view.SetUnderlayRange(DB.ElementId.InvalidElementId, DB.ElementId.InvalidElementId)
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,5 @@ tooltip:

Funciona tanto em vistas de planta/forro quanto em vistas de corte/elevação.
author: Mohamed Asli
min_revit_version: 2016
engine:
clean: true
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ tooltip:
Diese Skript richtet die aktuelle Kamera Ansicht senkrecht auf die gewählte Fläche aus. Das Tool erstellt eine Skizzenebene über der gewählten Fläche für die 3D Ansicht
pt_br: Reorienta a câmera da vista 3D atual, perpendicular à face selecionada. Esta ferramenta definirá um plano de trabalho sobre a face selecionada para desenho 3D
context: active-3d-view
min_revit_version: 2016

This file was deleted.

This file was deleted.

This file was deleted.

Loading