diff --git a/dev/WPFEdit/WPFEdit/WPFEdit.csproj b/dev/WPFEdit/WPFEdit/WPFEdit.csproj index fc03bc2f7..33a40d970 100644 --- a/dev/WPFEdit/WPFEdit/WPFEdit.csproj +++ b/dev/WPFEdit/WPFEdit/WPFEdit.csproj @@ -105,6 +105,11 @@ MSBuild:Compile Designer + + Tools\MatchConfigWindowLegacy.xaml + MSBuild:Compile + Designer + Tools\MakePatternWindow.xaml MSBuild:Compile diff --git a/dev/todo.todo b/dev/todo.todo index b34411f7f..f5e7b4b2d 100644 --- a/dev/todo.todo +++ b/dev/todo.todo @@ -3,5 +3,8 @@ pyrevit cli: installer: pyrevit: + ☐ fix log messages in tools + ☐ faster sheet titleblock selection tool + ☐ the help uri for splitpushbutton doesn't work correctly e.g match tool ☐ slowly move collectors in List tool to db.query ☐ slowly phase out the extpackages module and user PyRevitLabs diff --git a/extensions/pyRevitCore.extension/pyRevit.tab/_layout b/extensions/pyRevitCore.extension/pyRevit.tab/_layout new file mode 100644 index 000000000..301808084 --- /dev/null +++ b/extensions/pyRevitCore.extension/pyRevit.tab/_layout @@ -0,0 +1 @@ +pyRevit[beforeall:] \ No newline at end of file diff --git a/extensions/pyRevitCore.extension/pyRevit.tab/pyRevit.panel/Settings.smartbutton/SettingsWindow.xaml b/extensions/pyRevitCore.extension/pyRevit.tab/pyRevit.panel/Settings.smartbutton/SettingsWindow.xaml index ca2024444..8ef887247 100644 --- a/extensions/pyRevitCore.extension/pyRevit.tab/pyRevit.panel/Settings.smartbutton/SettingsWindow.xaml +++ b/extensions/pyRevitCore.extension/pyRevit.tab/pyRevit.panel/Settings.smartbutton/SettingsWindow.xaml @@ -80,7 +80,7 @@ - Rocket Mode 🚀 (Experimental / Reload Required) + Rocket Mode 🚀 (Reload Required) This is the switch for pyRevit Rocket Mode. If enabled, pyRevit will use a shared engine per each extension diff --git a/extensions/pyRevitCore.extension/pyRevit.tab/pyRevit.panel/tools.stack3/Spy.pulldown/Get Central Path.pushbutton/script.py b/extensions/pyRevitCore.extension/pyRevit.tab/pyRevit.panel/tools.stack3/Spy.pulldown/Get Central Path.pushbutton/script.py index b83a4cc69..2bffc077c 100644 --- a/extensions/pyRevitCore.extension/pyRevit.tab/pyRevit.panel/tools.stack3/Spy.pulldown/Get Central Path.pushbutton/script.py +++ b/extensions/pyRevitCore.extension/pyRevit.tab/pyRevit.panel/tools.stack3/Spy.pulldown/Get Central Path.pushbutton/script.py @@ -1,12 +1,8 @@ -__doc__ = 'Print the full path to the central model (if model is workshared).' +"""Print the full path to the central model (if model is workshared).""" - -from pyrevit import revit, DB, UI +#pylint: disable=E0401 +from pyrevit import revit from pyrevit import forms -if revit.doc.IsWorkshared: - model_path = revit.doc.GetWorksharingCentralModelPath() - print(DB.ModelPathUtils.ConvertModelPathToUserVisiblePath(model_path)) -else: - forms.alert('Model is not workshared.') +forms.check_workshared(doc=revit.doc) diff --git a/extensions/pyRevitTools.extension/extension.json b/extensions/pyRevitTools.extension/extension.json index 0b6878dac..7e81c3255 100644 --- a/extensions/pyRevitTools.extension/extension.json +++ b/extensions/pyRevitTools.extension/extension.json @@ -10,5 +10,9 @@ "url": "https://github.com/eirannejad/pyRevit.git", "website": "http://eirannejad.github.io/pyRevit/", "image": "", + "templates": { + "author": "Ehsan Iran-Nejad", + "docpath": "https://www.youtube.com/watch?v=" + }, "dependencies": [] } \ No newline at end of file diff --git a/extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/Tools.stack2/Inspect.pulldown/Find Linked Elements.pushbutton/script.py b/extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/Tools.stack2/Inspect.pulldown/Find Linked Elements.pushbutton/script.py index 0020ef1a0..0a93e4dee 100644 --- a/extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/Tools.stack2/Inspect.pulldown/Find Linked Elements.pushbutton/script.py +++ b/extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/Tools.stack2/Inspect.pulldown/Find Linked Elements.pushbutton/script.py @@ -3,7 +3,7 @@ __context__ = 'selection' -__helpurl__ = 'https://www.youtube.com/watch?v=4IlvCkoOolw' +__helpurl__ = '{{docpath}}4IlvCkoOolw' __doc__ = 'Lists all the elements that are tied to the selected element.'\ ' For example elements tags or dimensions.' diff --git a/extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/Tools.stack2/Sum.pushbutton/script.py b/extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/Tools.stack2/Sum.pushbutton/script.py index 38eacca76..79f70b607 100644 --- a/extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/Tools.stack2/Sum.pushbutton/script.py +++ b/extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/Tools.stack2/Sum.pushbutton/script.py @@ -149,8 +149,9 @@ def process_sets(element_list): el_sets[el.LineStyle.Name].append(el) else: eltype = revit.doc.GetElement(el.GetTypeId()) - wrapped_eltype = revit.ElementWrapper(eltype) - el_sets[wrapped_eltype.name].append(el) + if eltype: + wrapped_eltype = revit.ElementWrapper(eltype) + el_sets[wrapped_eltype.name].append(el) return el_sets diff --git a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Print.pulldown/Print Ordered Sheet Index.pushbutton/script.py b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Print.pulldown/Print Ordered Sheet Index.pushbutton/script.py index 825bc0323..83a5bdbdc 100644 --- a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Print.pulldown/Print Ordered Sheet Index.pushbutton/script.py +++ b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Print.pulldown/Print Ordered Sheet Index.pushbutton/script.py @@ -97,6 +97,18 @@ def show_placeholders(self): def include_placeholders(self): return self.indexspace_cb.IsChecked + @property + def sheet_list(self): + return self.sheets_lb.ItemsSource + + @sheet_list.setter + def sheet_list(self, value): + self.sheets_lb.ItemsSource = value + + @property + def printable_sheets(self): + return [x for x in self.sheet_list if x.printable] + def _get_schedule_text_data(self, schedule_view): schedule_data_file = \ script.get_instance_data_file(str(schedule_view.Id.IntegerValue)) @@ -112,8 +124,8 @@ def _get_schedule_text_data(self, schedule_view): as sched_data_file: return sched_data_file.readlines() except Exception as open_err: - logger.error('Error opening sheet index export: {} | {}' - .format(schedule_data_file, open_err)) + logger.error('Error opening sheet index export: %s | %s', + schedule_data_file, open_err) return sched_data def _order_sheets_by_schedule_data(self, schedule_view, sheet_list): @@ -126,13 +138,12 @@ def _order_sheets_by_schedule_data(self, schedule_view, sheet_list): for sheet in sheet_list: for line_no, data_line in enumerate(sched_data): try: - if sheet.CanBePrinted: - if sheet.SheetNumber in data_line: - ordered_sheets_dict[line_no] = sheet - break - else: - logger.warning('Sheet {} is not printable.' - .format(sheet.SheetNumber)) + if sheet.SheetNumber in data_line: + ordered_sheets_dict[line_no] = sheet + break + if not sheet.CanBePrinted: + logger.debug('Sheet %s is not printable.', + sheet.SheetNumber) except Exception: continue @@ -166,7 +177,7 @@ def _get_printmanager(self): except Exception as printerr: logger.critical('Error getting printer manager from document. ' 'Most probably there is not a printer defined ' - 'on your system. | {}'.format(printerr)) + 'on your system. | %s', printerr) return None def _print_combined_sheets_in_order(self): @@ -182,11 +193,13 @@ def _print_combined_sheets_in_order(self): sheet_set = DB.ViewSet() original_sheetnums = [] with revit.Transaction('Fix Sheet Numbers') as t: - for idx, sheet in enumerate(self.sheets_lb.ItemsSource): - sht = sheet.revit_sheet - original_sheetnums.append(sht.SheetNumber) - sht.SheetNumber = NPC * (idx + 1) + sht.SheetNumber - sheet_set.Insert(sht) + for idx, sheet in enumerate(self.sheet_list): + rvtsheet = sheet.revit_sheet + original_sheetnums.append(rvtsheet.SheetNumber) + rvtsheet.SheetNumber = \ + NPC * (idx + 1) + rvtsheet.SheetNumber + if sheet.printable: + sheet_set.Insert(rvtsheet) # Collect existing sheet sets cl = DB.FilteredElementCollector(revit.doc) @@ -222,7 +235,7 @@ def _print_combined_sheets_in_order(self): logger.critical( 'Error setting sheet set on print mechanism. ' 'These items are included in the viewset ' - 'object:\n{}'.format(sheet_report) + 'object:\n%s', sheet_report ) raise viewset_err @@ -241,10 +254,10 @@ def _print_combined_sheets_in_order(self): # now fix the sheet names with revit.Transaction('Restore Sheet Numbers') as t: - for sheet, sheetnum in zip(self.sheets_lb.ItemsSource, + for sheet, sheetnum in zip(self.sheet_list, original_sheetnums): - sht = sheet.revit_sheet - sht.SheetNumber = sheetnum + rvtsheet = sheet.revit_sheet + rvtsheet.SheetNumber = sheetnum def _print_sheets_in_order(self): # make sure we can access the print config @@ -254,7 +267,7 @@ def _print_sheets_in_order(self): print_mgr.PrintToFile = True # print_mgr.CombinedFile = False print_mgr.PrintRange = DB.PrintRange.Current - for sheet in self.sheets_lb.ItemsSource: + for sheet in self.sheet_list: output_fname = \ coreutils.cleanup_filename('{:05} {} - {}.pdf' .format(sheet.print_index, @@ -265,8 +278,8 @@ def _print_sheets_in_order(self): if sheet.printable: print_mgr.SubmitPrint(sheet.revit_sheet) else: - logger.warning('Sheet {} is not printable. Skipping print.' - .format(sheet.SheetNumber)) + logger.debug('Sheet %s is not printable. Skipping print.', + sheet.number) def _update_print_indices(self, sheet_list): for idx, sheet in enumerate(sheet_list): @@ -295,7 +308,7 @@ def selection_changed(self, sender, args): if not self.include_placeholders: self._update_print_indices(printable_sheets) - self.sheets_lb.ItemsSource = printable_sheets + self.sheet_list = printable_sheets else: self.indexspace_cb.IsChecked = True @@ -303,12 +316,12 @@ def selection_changed(self, sender, args): # update print indices self._update_print_indices(sheet_list) # Show all sheets - self.sheets_lb.ItemsSource = sheet_list + self.sheet_list = sheet_list def print_sheets(self, sender, args): - if self.sheets_lb.ItemsSource: + if self.sheet_list: if not self.combine_print: - sheet_count = len(self.sheets_lb.ItemsSource) + sheet_count = len(self.sheet_list) if sheet_count > 5: if not forms.alert('Are you sure you want to print {} ' 'sheets individually? The process can ' @@ -340,7 +353,7 @@ def drop_sheet(self, sender, args): dropped_idx = self.sheets_lb.Items.IndexOf(dropped_data) target_idx = self.sheets_lb.Items.IndexOf(target) - sheet_list = self.sheets_lb.ItemsSource + sheet_list = self.sheet_list sheet_list.remove(dropped_data) sheet_list.insert(target_idx, dropped_data) self._update_print_indices(sheet_list) diff --git a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Revision.pulldown/Create Revised Sheet Set.pushbutton/script.py b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Revision.pulldown/Create Revised Sheet Set.pushbutton/script.py index c97064b9f..8f6135158 100644 --- a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Revision.pulldown/Create Revised Sheet Set.pushbutton/script.py +++ b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Revision.pulldown/Create Revised Sheet Set.pushbutton/script.py @@ -3,7 +3,6 @@ from pyrevit import forms -__author__ = '{{author}}' __doc__ = 'Select a revision from the list of revisions and this script '\ 'will create a print sheet set for the revised sheets under the '\ 'selected revision, and will assign the new sheet set as '\ diff --git a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Batch Sheet Maker.pushbutton/script.py b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Batch Sheet Maker.pushbutton/script.py index a29cbe751..3bf414145 100644 --- a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Batch Sheet Maker.pushbutton/script.py +++ b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Batch Sheet Maker.pushbutton/script.py @@ -6,7 +6,7 @@ from pyrevit import script -__helpurl__ = "https://www.youtube.com/watch?v=SJzs9ZxqRYc" +__helpurl__ = "{{docpath}}SJzs9ZxqRYc" __doc__ = 'Enter sheet names and numbers in the text box and '\ 'this tool will create all at once.' diff --git a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Copy Sheets to Open Documents.pushbutton/script.py b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Copy Sheets to Open Documents.pushbutton/script.py index ecba88153..43f2bd103 100644 --- a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Copy Sheets to Open Documents.pushbutton/script.py +++ b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Copy Sheets to Open Documents.pushbutton/script.py @@ -7,7 +7,7 @@ from Autodesk.Revit.DB import Element as DBElement -__helpurl__ = 'https://www.youtube.com/watch?v=9Q-J6mWBYJI&t=17s' +__helpurl__ = '{{docpath}}9Q-J6mWBYJI&t=17s' __doc__ = 'Copies selected or current sheet(s) to other ' \ 'projects currently open in Revit. Make sure the destination ' \ 'documents have at least one Legend view (Revit API does not ' \ diff --git a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Legends.pulldown/Copy Selected Legends As Detail Views To Open Documents.pushbutton/script.py b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Legends.pulldown/Copy Selected Legends As Detail Views To Open Documents.pushbutton/script.py index 595804843..270f9387c 100644 --- a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Legends.pulldown/Copy Selected Legends As Detail Views To Open Documents.pushbutton/script.py +++ b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Legends.pulldown/Copy Selected Legends As Detail Views To Open Documents.pushbutton/script.py @@ -4,7 +4,7 @@ from pyrevit import forms -__helpurl__ = 'https://www.youtube.com/watch?v=ThzcRM_Tj8g' +__helpurl__ = '{{docpath}}ThzcRM_Tj8g' __doc__ = 'Converts selected legend views to detail views and copies '\ 'them to all projects currently open in Revit.' diff --git a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Legends.pulldown/Copy Selected Legends To Open Documents.pushbutton/script.py b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Legends.pulldown/Copy Selected Legends To Open Documents.pushbutton/script.py index 8066953b9..ca36460c6 100644 --- a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Legends.pulldown/Copy Selected Legends To Open Documents.pushbutton/script.py +++ b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Legends.pulldown/Copy Selected Legends To Open Documents.pushbutton/script.py @@ -6,7 +6,7 @@ from pyrevit import forms -__helpurl__ = 'https://www.youtube.com/watch?v=ThzcRM_Tj8g' +__helpurl__ = '{{docpath}}ThzcRM_Tj8g' class CopyUseDestination(DB.IDuplicateTypeNamesHandler): diff --git a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Views.pulldown/Find Referring Views.pushbutton/script.py b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Views.pulldown/Find Referring Views.pushbutton/script.py index cb4dff902..de6c4bb88 100644 --- a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Views.pulldown/Find Referring Views.pushbutton/script.py +++ b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Views.pulldown/Find Referring Views.pushbutton/script.py @@ -5,6 +5,7 @@ from pyrevit import script +logger = script.get_logger() output = script.get_output() @@ -30,12 +31,12 @@ class ReferencingView: def __init__(self, view_id): - self.element = doc.GetElement(view_id) + self.element = revit.doc.GetElement(view_id) if not self._valid_view(): raise Exception() - title = self.element.LookupParameter('Title on Sheet').AsString() - self.name = title if title else self.element.ViewName + titleos = self.element.LookupParameter('Title on Sheet').AsString() + self.name = titleos if titleos else self.element.ViewName self.refs = [] self._update_refs(all_ref_els) # self._update_refs(self.element.GetReferenceCallouts()) @@ -59,9 +60,12 @@ def _valid_view(self): def _update_refs(self, el_list): for elid in el_list: - el = doc.GetElement(elid) - if el.OwnerViewId == self.element.Id: - self.refs.append(el.Name) + element = revit.doc.GetElement(elid) + viewnameparam = element.LookupParameter("View Name") + if element.OwnerViewId == self.element.Id \ + or (viewnameparam \ + and viewnameparam.AsString() == self.element.ViewName): + self.refs.append(element.Name) def is_referring_to(self, view_name): return view_name in self.refs @@ -76,14 +80,13 @@ def is_sheeted(self): try: rv = ReferencingView(view.Id) all_views.append(rv) - except Exception: - pass + except Exception as ex: + logger.debug(ex) print('{} views processed...'.format(len(all_views))) -for selid in selection: - vp = revit.doc.GetElement(selid) +for vp in selection: if isinstance(vp, DB.Viewport): v = revit.doc.GetElement(vp.ViewId) title = v.LookupParameter('Title on Sheet').AsString() diff --git a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Views.pulldown/Purge Unused Filters.pushbutton/script.py b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Views.pulldown/Purge Unused Filters.pushbutton/script.py index ac3bea39b..f0cc991c7 100644 --- a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Views.pulldown/Purge Unused Filters.pushbutton/script.py +++ b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Views.pulldown/Purge Unused Filters.pushbutton/script.py @@ -45,28 +45,28 @@ def name(self): if not unusedFilters: forms.alert('All filters are in use. No purging in necessary.') - -# ask user for wipe actions -return_options = \ - forms.SelectFromList.show( - [ViewFilterToPurge(revit.doc.GetElement(DB.ElementId(x))) - for x in unusedFilters], - title='Select Filters to Purge', - width=500, - button_name='Purge Filters', - multiselect=True - ) - -# print('{} Filters have not been used and will be purged.' -# .format(len(unusedFilters))) - -if return_options: - with revit.Transaction('Purge Unused Filters'): - for vf in return_options: - logger.debug('Purging Filter: {0}\t{1}' - .format(vf.Id, vf.Name)) - try: - revit.doc.Delete(vf.Id) - except Exception as del_err: - logger.error('Error purging filter: {} | {}' - .format(vf.Name, del_err)) +else: + # ask user for wipe actions + return_options = \ + forms.SelectFromList.show( + [ViewFilterToPurge(revit.doc.GetElement(DB.ElementId(x))) + for x in unusedFilters], + title='Select Filters to Purge', + width=500, + button_name='Purge Filters', + multiselect=True + ) + + # print('{} Filters have not been used and will be purged.' + # .format(len(unusedFilters))) + + if return_options: + with revit.Transaction('Purge Unused Filters'): + for vf in return_options: + logger.debug('Purging Filter: {0}\t{1}' + .format(vf.Id, vf.Name)) + try: + revit.doc.Delete(vf.Id) + except Exception as del_err: + logger.error('Error purging filter: {} | {}' + .format(vf.Name, del_err)) diff --git a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Views.pulldown/Purge Unused View Templates.pushbutton/script.py b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Views.pulldown/Purge Unused View Templates.pushbutton/script.py index 26e79ab9c..32df3d89f 100644 --- a/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Views.pulldown/Purge Unused View Templates.pushbutton/script.py +++ b/extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Views.pulldown/Purge Unused View Templates.pushbutton/script.py @@ -35,7 +35,9 @@ def name(self): unusedvtemp = vtemp - usedvtemp -if unusedvtemp: +if not unusedvtemp: + forms.alert('All View Templates are in use. No purging in necessary.') +else: # ask user for wipe actions return_options = \ forms.SelectFromList.show( diff --git a/extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/3D.pulldown/Orient Section Box To Face.pushbutton/script.py b/extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/3D.pulldown/Orient Section Box To Face.pushbutton/script.py index c3a2882f4..1087dc04e 100644 --- a/extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/3D.pulldown/Orient Section Box To Face.pushbutton/script.py +++ b/extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/3D.pulldown/Orient Section Box To Face.pushbutton/script.py @@ -5,7 +5,7 @@ from pyrevit import forms -__helpurl__ = 'https://www.youtube.com/watch?v=b050tpp4vCE&t=42s' +__helpurl__ = '{{docpath}}b050tpp4vCE&t=42s' curview = revit.activeview diff --git a/extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/3D.pulldown/Orient View To Face.pushbutton/script.py b/extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/3D.pulldown/Orient View To Face.pushbutton/script.py index 81e085083..c2b658e78 100644 --- a/extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/3D.pulldown/Orient View To Face.pushbutton/script.py +++ b/extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/3D.pulldown/Orient View To Face.pushbutton/script.py @@ -3,7 +3,7 @@ from pyrevit import forms -__helpurl__ = 'https://www.youtube.com/watch?v=pIjDd4dZng0' +__helpurl__ = '{{docpath}}pIjDd4dZng0' __doc__ = 'Reorients the current 3D view camera, perpendicular to the ' \ 'selected face. This tool will set a sketch plane over the ' \ 'selected face for 3d drawing.' @@ -41,7 +41,7 @@ def reorient(): curview = revit.activeview -if isinstance(curview, DB.View3D) and curview.IsSectionBoxActive: +if isinstance(curview, DB.View3D): reorient() else: forms.alert('You must be on a 3D view for this tool to work.') diff --git a/extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/Match.pushbutton/MatchConfigWindow.xaml b/extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/Match.pushbutton/MatchConfigWindow.xaml index 39971e31c..2a83a695f 100644 --- a/extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/Match.pushbutton/MatchConfigWindow.xaml +++ b/extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/Match.pushbutton/MatchConfigWindow.xaml @@ -1,48 +1,86 @@ - - - - - Halftone - Transparency - - - Projection Line Color - Projection Line Pattern - Projection Line Weight - Projection Fill Color - Projection Fill Pattern - Projection Fill Pattern Visibility + + + + + + + + + + + + + + Halftone + Transparency + + + + Line Color + Line Pattern + Line Weight + + Fill Color + Fill Pattern + Fill Pattern Visibility + + Fill Color + Fill Pattern + Fill Pattern Visibility - - - Cut Line Color - Cut Line Pattern - Cut Line Weight - Cut Fill Color - Cut Fill Pattern - Cut Fill Pattern Visibility + + + + Line Color + Line Pattern + Line Weight + + Fill Color + Fill Pattern + Fill Pattern Visibility + + Fill Color + Fill Pattern + Fill Pattern Visibility - - - - - Replaced Value - Text Position - Above Value - Below Value - Prefix Value - Postfix Value - - - - -