From c97f50e0eeb4872b3b9e604c7139fee5218d8285 Mon Sep 17 00:00:00 2001 From: kraftwerk15 Date: Fri, 23 Jul 2021 08:28:48 -0500 Subject: [PATCH 1/8] Update to .Net Framework 4.8 --- BatchRevitDynamo/BatchRevitDynamo.csproj | 2 +- BatchRvt/BatchRvt.csproj | 2 +- BatchRvtAddin2015/BatchRvtAddin2015.csproj | 2 +- BatchRvtAddin2016/BatchRvtAddin2016.csproj | 2 +- BatchRvtAddin2017/BatchRvtAddin2017.csproj | 2 +- BatchRvtAddin2018/BatchRvtAddin2018.csproj | 2 +- BatchRvtAddin2019/BatchRvtAddin2019.csproj | 2 +- BatchRvtAddin2020/BatchRvtAddin2020.csproj | 2 +- BatchRvtGUI/BatchRvtGUI.csproj | 2 +- BatchRvtScriptHost/BatchRvtScriptHost.csproj | 2 +- BatchRvtUtil/BatchRvtUtil.csproj | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/BatchRevitDynamo/BatchRevitDynamo.csproj b/BatchRevitDynamo/BatchRevitDynamo.csproj index 6494408..df6c813 100644 --- a/BatchRevitDynamo/BatchRevitDynamo.csproj +++ b/BatchRevitDynamo/BatchRevitDynamo.csproj @@ -9,7 +9,7 @@ Properties BatchRevitDynamo BatchRevitDynamo - v4.5 + v4.8 512 diff --git a/BatchRvt/BatchRvt.csproj b/BatchRvt/BatchRvt.csproj index affdb2e..43ea401 100644 --- a/BatchRvt/BatchRvt.csproj +++ b/BatchRvt/BatchRvt.csproj @@ -9,7 +9,7 @@ Properties BatchRvt BatchRvt - v4.5 + v4.8 512 diff --git a/BatchRvtAddin2015/BatchRvtAddin2015.csproj b/BatchRvtAddin2015/BatchRvtAddin2015.csproj index 43eb941..eb1caff 100644 --- a/BatchRvtAddin2015/BatchRvtAddin2015.csproj +++ b/BatchRvtAddin2015/BatchRvtAddin2015.csproj @@ -9,7 +9,7 @@ Properties BatchRvt.Addin.Revit2015 BatchRvtAddin2015 - v4.5 + v4.8 512 diff --git a/BatchRvtAddin2016/BatchRvtAddin2016.csproj b/BatchRvtAddin2016/BatchRvtAddin2016.csproj index 16a203c..8613da5 100644 --- a/BatchRvtAddin2016/BatchRvtAddin2016.csproj +++ b/BatchRvtAddin2016/BatchRvtAddin2016.csproj @@ -9,7 +9,7 @@ Properties BatchRvt.Addin.Revit2016 BatchRvtAddin2016 - v4.5 + v4.8 512 diff --git a/BatchRvtAddin2017/BatchRvtAddin2017.csproj b/BatchRvtAddin2017/BatchRvtAddin2017.csproj index 6b1dcbb..29b8bb5 100644 --- a/BatchRvtAddin2017/BatchRvtAddin2017.csproj +++ b/BatchRvtAddin2017/BatchRvtAddin2017.csproj @@ -9,7 +9,7 @@ Properties BatchRvt.Addin.Revit2017 BatchRvtAddin2017 - v4.5.2 + v4.8 512 diff --git a/BatchRvtAddin2018/BatchRvtAddin2018.csproj b/BatchRvtAddin2018/BatchRvtAddin2018.csproj index 6f2a4dc..ef709ca 100644 --- a/BatchRvtAddin2018/BatchRvtAddin2018.csproj +++ b/BatchRvtAddin2018/BatchRvtAddin2018.csproj @@ -9,7 +9,7 @@ Properties BatchRvt.Addin.Revit2018 BatchRvtAddin2018 - v4.5.2 + v4.8 512 diff --git a/BatchRvtAddin2019/BatchRvtAddin2019.csproj b/BatchRvtAddin2019/BatchRvtAddin2019.csproj index 8454953..6634497 100644 --- a/BatchRvtAddin2019/BatchRvtAddin2019.csproj +++ b/BatchRvtAddin2019/BatchRvtAddin2019.csproj @@ -9,7 +9,7 @@ Properties BatchRvt.Addin.Revit2019 BatchRvtAddin2019 - v4.7.2 + v4.8 512 true diff --git a/BatchRvtAddin2020/BatchRvtAddin2020.csproj b/BatchRvtAddin2020/BatchRvtAddin2020.csproj index 4786083..bc60016 100644 --- a/BatchRvtAddin2020/BatchRvtAddin2020.csproj +++ b/BatchRvtAddin2020/BatchRvtAddin2020.csproj @@ -9,7 +9,7 @@ Properties BatchRvt.Addin.Revit2020 BatchRvtAddin2020 - v4.7.2 + v4.8 512 true diff --git a/BatchRvtGUI/BatchRvtGUI.csproj b/BatchRvtGUI/BatchRvtGUI.csproj index d4be88a..8a7e057 100644 --- a/BatchRvtGUI/BatchRvtGUI.csproj +++ b/BatchRvtGUI/BatchRvtGUI.csproj @@ -9,7 +9,7 @@ Properties BatchRvtGUI BatchRvtGUI - v4.5 + v4.8 512 diff --git a/BatchRvtScriptHost/BatchRvtScriptHost.csproj b/BatchRvtScriptHost/BatchRvtScriptHost.csproj index 7f37a39..c35c8b0 100644 --- a/BatchRvtScriptHost/BatchRvtScriptHost.csproj +++ b/BatchRvtScriptHost/BatchRvtScriptHost.csproj @@ -9,7 +9,7 @@ Properties BatchRvt.ScriptHost BatchRvtScriptHost - v4.5 + v4.8 512 diff --git a/BatchRvtUtil/BatchRvtUtil.csproj b/BatchRvtUtil/BatchRvtUtil.csproj index 44b34c9..496af25 100644 --- a/BatchRvtUtil/BatchRvtUtil.csproj +++ b/BatchRvtUtil/BatchRvtUtil.csproj @@ -9,7 +9,7 @@ Properties BatchRvtUtil BatchRvtUtil - v4.5 + v4.8 512 From 571b225309fd6a60c3a6bb04cd1b21d8f6c07e45 Mon Sep 17 00:00:00 2001 From: Jan Christel Date: Fri, 19 Nov 2021 14:15:00 +1100 Subject: [PATCH 2/8] Update batch_rvt_monitor.py Added exception catches to avoid path to long exceptions stopping batch processor from running. --- BatchRvtUtil/Scripts/batch_rvt_monitor.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/BatchRvtUtil/Scripts/batch_rvt_monitor.py b/BatchRvtUtil/Scripts/batch_rvt_monitor.py index ee21bee..a02040d 100644 --- a/BatchRvtUtil/Scripts/batch_rvt_monitor.py +++ b/BatchRvtUtil/Scripts/batch_rvt_monitor.py @@ -340,7 +340,8 @@ def ProcessRevitFiles(batchRvtConfig, supportedRevitFileList): snapshotDataExportFolderPath = str.Empty if batchRvtConfig.EnableDataExport: - snapshotDataExportFolderPath = snapshot_data_util.GetSnapshotFolderPath( + try: + snapshotDataExportFolderPath = snapshot_data_util.GetSnapshotFolderPath( batchRvtConfig.DataExportFolderPath, revitFilePath, isCloudModel, @@ -348,9 +349,11 @@ def ProcessRevitFiles(batchRvtConfig, supportedRevitFileList): cloudModelId, batchRvtConfig.SessionStartTime ) - path_util.CreateDirectory(snapshotDataExportFolderPath) - snapshotDataExportFolderPaths.append(snapshotDataExportFolderPath) - + path_util.CreateDirectory(snapshotDataExportFolderPath) + snapshotDataExportFolderPaths.append(snapshotDataExportFolderPath) + except Exception as ex: + Output("Failed to write session data: " + str(ex)) + scriptData = ScriptDataUtil.ScriptData() scriptData.SessionId.SetValue(batchRvtConfig.SessionId) scriptData.TaskScriptFilePath.SetValue(batchRvtConfig.ScriptFilePath) @@ -448,9 +451,10 @@ def RunBatchRevitTasks(batchRvtConfig): Output("Revit Files for processing (" + str(supportedCount) + "):") for supportedRevitFileInfo in supportedRevitFileList: batch_rvt_monitor_util.ShowSupportedRevitFileInfo(supportedRevitFileInfo, Output) - - if batchRvtConfig.EnableDataExport: - session_data_exporter.ExportSessionFilesData( + + try: + if batchRvtConfig.EnableDataExport: + session_data_exporter.ExportSessionFilesData( batchRvtConfig.SessionDataFolderPath, batchRvtConfig.SessionId, [ @@ -458,6 +462,8 @@ def RunBatchRevitTasks(batchRvtConfig): for supportedRevitFileInfo in supportedRevitFileList ] ) + except Exception as ex: + Output("Failed to write session data: " + str(ex)) if not aborted: Output() From 79c85f9e875bc1ee9d2539713f8cda06f07497d4 Mon Sep 17 00:00:00 2001 From: Jan Christel Date: Fri, 19 Nov 2021 14:15:51 +1100 Subject: [PATCH 3/8] Update revit_failure_handling.py Testing alternative error resolution types to avoid Revit deleting elements where not necessarily wanted or needed. --- BatchRvtUtil/Scripts/revit_failure_handling.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BatchRvtUtil/Scripts/revit_failure_handling.py b/BatchRvtUtil/Scripts/revit_failure_handling.py index 0590601..7b09647 100644 --- a/BatchRvtUtil/Scripts/revit_failure_handling.py +++ b/BatchRvtUtil/Scripts/revit_failure_handling.py @@ -112,6 +112,10 @@ def ProcessFailures(failuresAccessor, output, rollBackOnWarning=False): elif failureDefinition.IsResolutionApplicable(FailureResolutionType.UnlockConstraints): output() output("\t" + "WARNING: UnlockConstraints is not a valid resolution for this failure despite the definition reporting that it is an applicable resolution!") + elif failure.HasResolutionOfType(FailureResolutionType.DetachElements): + failure.SetCurrentResolutionType(FailureResolutionType.DetachElements) + elif failure.HasResolutionOfType(FailureResolutionType.SkipElements): + failure.SetCurrentResolutionType(FailureResolutionType.SkipElements) output() output("\t" + "Attempting to resolve error using resolution: " + str(failure.GetCurrentResolutionType())) failuresAccessor.ResolveFailure(failure) From 66c0c04a920df30d5abb672d7ba8b83e212e6b25 Mon Sep 17 00:00:00 2001 From: Sebastian Rubiano Date: Tue, 15 Feb 2022 11:36:22 -0500 Subject: [PATCH 4/8] Add support for dialogs displayed in Spanish --- .../Scripts/revit_dialog_detection.py | 75 ++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/BatchRvtUtil/Scripts/revit_dialog_detection.py b/BatchRvtUtil/Scripts/revit_dialog_detection.py index 1dd3968..a049f32 100644 --- a/BatchRvtUtil/Scripts/revit_dialog_detection.py +++ b/BatchRvtUtil/Scripts/revit_dialog_detection.py @@ -32,9 +32,17 @@ LOAD_LINK_WINDOW_TITLE = "Load Link" CHANGES_NOT_SAVED_TITLE = "Changes Not Saved" CLOSE_PROJECT_WITHOUT_SAVING_TITLE = "Close Project Without Saving" +CERRAR_PROYECTO_SIN_GUARDAR = "Cerrar proyecto sin guardar" SAVE_FILE_WINDOW_TITLE = "Save File" EDITABLE_ELEMENTS_TITLE = "Editable Elements" AUTODESK_CUSTOMER_INVOLVEMENT_PROGRAM_TITLE = "Autodesk Customer Involvement Program" +CAMBIOS_NO_GUARDADOS_TITLE = "Cambios no guardados" +ELEMENTS_LOST_ON_IMPORT_TITLE = "Elements Lost on Import" +REFERENCIAS_TITLE = "Referencias sin resolver" +CAMBIOS_TITLE = "Cambios locales no sincronizados con archivo central" +CHANGES_TITLE = "Local Changes Not Synchronized with Central" +NWC_TITLE = "Navisworks NWC Exporter" +REVIT_TITLE = "Revit" OPENING_WORKSETS_TITLES = [ "Worksets", "Opening Worksets" @@ -44,17 +52,27 @@ CTRLNOTIFYSINK_CLASS_NAME = "CtrlNotifySink" BUTTON_CLASS_NAME = "Button" STATIC_CONTROL_CLASS_NAME = "Static" - +CANCELAR_BUTTON_TEXT = "Cancelar" CLOSE_BUTTON_TEXT = "Close" +CERRAR_BUTTON_TEXT = "Cerrar" +ACEPTAR_BUTTON_TEXT = "Aceptar" +CEDER_TODO_BUTTON_TEXT = "Ceder todos los elementos y subproyectos" +CEDER_BUTTON_TEXT = "Ceder los elementos y subproyectos" OK_BUTTON_TEXT = "OK" +IGNORAR_BUTTON_TEXT = "Ignorar y abrir el proyecto" +NO_GUARDAR_PROYECTO_BUTTON_TEXT = "No guardar el proyecto" NO_BUTTON_TEXT = "No" YES_BUTTON_TEXT = "Yes" ALWAYS_LOAD_BUTTON_TEXT = "Always Load" CANCEL_LINK_BUTTON_TEXT = "Cancel Link" DO_NOT_SAVE_THE_PROJECT_TEXT = "Do not save the project" +CERRAR_ARCHIVO_LOCAL_BUTTON_TEXT = "Cerrar el archivo local" +CLOSE_LOCAL_FILE_BUTTON_TEXT = "Close the local file" + RELINQUISH_ALL_ELEMENTS_AND_WORKSETS_TEXT = "Relinquish all elements and worksets" RELINQUISH_ELEMENTS_AND_WORKSETS_TEXT = "Relinquish elements and worksets" + HAVE_REPORTED_BATCH_RVT_ERROR_WINDOW_DETECTION = [False] @@ -75,9 +93,16 @@ def __init__(self, dialogHwnd): def SendButtonClick(buttons, output): okButtons = ui_automation_util.FilterControlsByText(buttons, OK_BUTTON_TEXT) + aceptarButtons = ui_automation_util.FilterControlsByText(buttons, ACEPTAR_BUTTON_TEXT) + ignorarButtons = ui_automation_util.FilterControlsByText(buttons, IGNORAR_BUTTON_TEXT) + cederButtons = ui_automation_util.FilterControlsByText(buttons, CEDER_BUTTON_TEXT) + cerrarButtons = ui_automation_util.FilterControlsByText(buttons, CERRAR_BUTTON_TEXT) + noGuardarButtons = ui_automation_util.FilterControlsByText(buttons, NO_GUARDAR_PROYECTO_BUTTON_TEXT) closeButtons = ui_automation_util.FilterControlsByText(buttons, CLOSE_BUTTON_TEXT) noButtons = ui_automation_util.FilterControlsByText(buttons, NO_BUTTON_TEXT) alwaysLoadButtons = ui_automation_util.FilterControlsByText(buttons, ALWAYS_LOAD_BUTTON_TEXT) + cerrarLocalButtons = ui_automation_util.FilterControlsByText(buttons, CERRAR_ARCHIVO_LOCAL_BUTTON_TEXT) + closeLocalButtons = ui_automation_util.FilterControlsByText(buttons, CLOSE_LOCAL_FILE_BUTTON_TEXT) if len(okButtons) == 1: targetButton = okButtons[0] @@ -87,6 +112,21 @@ def SendButtonClick(buttons, output): targetButton = noButtons[0] elif len(alwaysLoadButtons) == 1: targetButton = alwaysLoadButtons[0] + elif len(ignorarButtons) == 1: + targetButton = ignorarButtons[0] + elif len(noGuardarButtons) == 1: + targetButton = noGuardarButtons[0] + elif len(cederButtons) == 1: + targetButton = cederButtons[0] + elif len(cerrarButtons) == 1: + targetButton = cerrarButtons[0] + elif len(aceptarButtons) == 1: + targetButton = aceptarButtons[0] + elif len(cerrarLocalButtons) == 1: + targetButton = aceptarButtons[0] + elif len(closeLocalButtons) == 1: + targetButton = aceptarButtons[0] + else: output() output("WARNING: Could not find suitable button to click.") @@ -172,6 +212,39 @@ def DismissCheekyRevitDialogBoxes(revitProcessId, output_): output() output("'" + enabledDialog.WindowText + "' dialog box detected.") DismissRevitDialogBox(enabledDialog.WindowText, buttons, RELINQUISH_ELEMENTS_AND_WORKSETS_TEXT, output) + elif enabledDialog.WindowText == CAMBIOS_NO_GUARDADOS_TITLE and len(buttons) == 4: + output() + output("'" + enabledDialog.WindowText + "' dialog box detected.") + DismissRevitDialogBox(enabledDialog.WindowText, buttons, NO_GUARDAR_PROYECTO_BUTTON_TEXT, output) + elif enabledDialog.WindowText == CERRAR_PROYECTO_SIN_GUARDAR and len(buttons) == 3: + output() + output("'" + enabledDialog.WindowText + "' dialog box detected.") + DismissRevitDialogBox(enabledDialog.WindowText, buttons, CEDER_TODO_BUTTON_TEXT, output) + elif enabledDialog.WindowText == REFERENCIAS_TITLE and len(buttons) == 2: + output() + output("'" + enabledDialog.WindowText + "' dialog box detected.") + DismissRevitDialogBox(enabledDialog.WindowText, buttons, IGNORAR_BUTTON_TEXT, output) + elif enabledDialog.WindowText == NWC_TITLE and len(buttons) == 1: + output() + output("'" + enabledDialog.WindowText + "' dialog box detected.") + DismissRevitDialogBox(enabledDialog.WindowText, buttons, ACEPTAR_BUTTON_TEXT, output) + elif enabledDialog.WindowText == REVIT_TITLE and len(buttons) == 1: + output() + output("'" + enabledDialog.WindowText + "' dialog box detected.") + DismissRevitDialogBox(enabledDialog.WindowText, buttons, ACEPTAR_BUTTON_TEXT, output) + elif enabledDialog.WindowText == CAMBIOS_TITLE and len(buttons) == 3: + output() + output("'" + enabledDialog.WindowText + "' dialog box detected.") + DismissRevitDialogBox(enabledDialog.WindowText, buttons, CERRAR_ARCHIVO_LOCAL_BUTTON_TEXT, output) + elif enabledDialog.WindowText == CHANGES_TITLE and len(buttons) == 3: + output() + output("'" + enabledDialog.WindowText + "' dialog box detected.") + DismissRevitDialogBox(enabledDialog.WindowText, buttons, CLOSE_LOCAL_FILE_BUTTON_TEXT, output) + elif enabledDialog.WindowText == ELEMENTS_LOST_ON_IMPORT_TITLE and len(buttons) == 1: + output() + output("'" + enabledDialog.WindowText + "' dialog box detected.") + DismissRevitDialogBox(enabledDialog.WindowText, buttons, CERRAR_BUTTON_TEXT, output) + ####### elif enabledDialog.WindowText in ["Revit", str.Empty] and len(buttons) == 0 and len(win32Buttons) > 0: output() output("'" + enabledDialog.WindowText + "' dialog box detected.") From 1038be361b1f4fa65b532235b2ec7c5caf11e45f Mon Sep 17 00:00:00 2001 From: Dimitar Venkov Date: Fri, 20 May 2022 18:45:07 +0300 Subject: [PATCH 5/8] Update revit_file_util.py --- BatchRvtUtil/Scripts/revit_file_util.py | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/BatchRvtUtil/Scripts/revit_file_util.py b/BatchRvtUtil/Scripts/revit_file_util.py index a6e25b3..e61ee6a 100644 --- a/BatchRvtUtil/Scripts/revit_file_util.py +++ b/BatchRvtUtil/Scripts/revit_file_util.py @@ -127,6 +127,15 @@ def ToCloudPath(cloudProjectId, cloudModelId): cloudPath = ModelPathUtils.ConvertCloudGUIDsToCloudPath(cloudProjectGuid, cloudModelGuid) return cloudPath +def ToCloudPath2021(cloudProjectId, cloudModelId): + cloudProjectGuid = ToGuid(cloudProjectId) + cloudModelGuid = ToGuid(cloudModelId) + try: + cloudPath = ModelPathUtils.ConvertCloudGUIDsToCloudPath(ModelPathUtils.CloudRegionUS, cloudProjectGuid, cloudModelGuid) + except: + cloudPath = ModelPathUtils.ConvertCloudGUIDsToCloudPath(ModelPathUtils.CloudRegionEMEA, cloudProjectGuid, cloudModelGuid) + return cloudPath + def OpenNewLocal(application, modelPath, localModelPath, closeAllWorksets=False, worksetConfig=None, audit=False): modelPath = ToModelPath(modelPath) localModelPath = ToModelPath(localModelPath) @@ -171,8 +180,17 @@ def OpenAndActivateDetachAndPreserveWorksets(uiApplication, modelPath, closeAllW openOptions.Audit = True return uiApplication.OpenAndActivateDocument(modelPath, openOptions, False) +def IsRvt2021_OrNewer(application): + try: + return int(application.VersionNumber) > 2020 + except: + return false + def OpenCloudDocument(application, cloudProjectId, cloudModelId, closeAllWorksets=False, worksetConfig=None, audit=False): - cloudPath = ToCloudPath(cloudProjectId, cloudModelId) + if IsRvt2021_OrNewer(application): + cloudPath = ToCloudPath2021(cloudProjectId, cloudModelId) + else: + cloudPath = ToCloudPath(cloudProjectId, cloudModelId) openOptions = OpenOptions() worksetConfig = ParseWorksetConfigurationOption(closeAllWorksets, worksetConfig) openOptions.SetOpenWorksetsConfiguration(worksetConfig) @@ -181,7 +199,10 @@ def OpenCloudDocument(application, cloudProjectId, cloudModelId, closeAllWorkset return application.OpenDocumentFile(cloudPath, openOptions) def OpenAndActivateCloudDocument(uiApplication, cloudProjectId, cloudModelId, closeAllWorksets=False, worksetConfig=None, audit=False): - cloudPath = ToCloudPath(cloudProjectId, cloudModelId) + if IsRvt2021_OrNewer(uiApplication.Application): + cloudPath = ToCloudPath2021(cloudProjectId, cloudModelId) + else: + cloudPath = ToCloudPath(cloudProjectId, cloudModelId) openOptions = OpenOptions() worksetConfig = ParseWorksetConfigurationOption(closeAllWorksets, worksetConfig) openOptions.SetOpenWorksetsConfiguration(worksetConfig) From d3ef007f3c9e792a84741e9f87411fbd31512a12 Mon Sep 17 00:00:00 2001 From: Dimitar Venkov Date: Fri, 20 May 2022 18:45:28 +0300 Subject: [PATCH 6/8] Update revit_file_list.py --- BatchRvtUtil/Scripts/revit_file_list.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BatchRvtUtil/Scripts/revit_file_list.py b/BatchRvtUtil/Scripts/revit_file_list.py index 39eb382..6ec5729 100644 --- a/BatchRvtUtil/Scripts/revit_file_list.py +++ b/BatchRvtUtil/Scripts/revit_file_list.py @@ -89,10 +89,10 @@ def __init__(self, cloudModelDescriptor): self.isValid = False parts = self.GetCloudModelDescriptorParts(cloudModelDescriptor) numberOfParts = len(parts) - if numberOfParts == 2 or numberOfParts == 3: + if numberOfParts > 1 : revitVersionPart = str.Empty otherParts = parts - if numberOfParts == 3: + if numberOfParts > 2 : revitVersionPart = parts[0] otherParts = parts[1:] self.projectGuid = self.SafeParseGuidText(otherParts[0]) From 8da401c7298e42dc5fbffcb3a2d8713560353626 Mon Sep 17 00:00:00 2001 From: punderscoresmithuk <51383696+punderscoresmithuk@users.noreply.github.com> Date: Tue, 9 Aug 2022 11:17:49 +1000 Subject: [PATCH 7/8] Updates version no Adds a GlobalAssemblyInfo.cs file and links all project's properties to it to control the version no in one place Updates Inno setup version no --- BatchRevitDynamo/BatchRevitDynamo.csproj | 3 +++ BatchRevitDynamo/Properties/AssemblyInfo.cs | 14 ++------------ BatchRvt/BatchRvt.csproj | 3 +++ BatchRvt/Properties/AssemblyInfo.cs | 13 ------------- BatchRvtAddin2015/Properties/AssemblyInfo.cs | 13 ------------- BatchRvtAddin2015/Properties/GlobalAssemblyInfo.cs | 11 +++++++++++ BatchRvtAddin2016/Properties/AssemblyInfo.cs | 13 ------------- BatchRvtAddin2017/Properties/AssemblyInfo.cs | 13 ------------- BatchRvtAddin2018/Properties/AssemblyInfo.cs | 13 ------------- BatchRvtAddin2019/Properties/AssemblyInfo.cs | 13 ------------- BatchRvtAddin2020/Properties/AssemblyInfo.cs | 12 ------------ BatchRvtAddin2021/Properties/AssemblyInfo.cs | 13 ------------- BatchRvtAddin2022/Properties/AssemblyInfo.cs | 13 ------------- BatchRvtGUI/Properties/AssemblyInfo.cs | 13 ------------- BatchRvtScriptHost/Properties/AssemblyInfo.cs | 13 ------------- BatchRvtUtil/Properties/AssemblyInfo.cs | 13 ------------- Common/GlobalAssemblyInfo.cs | 11 +++++++++++ RevitBatchProcessor.sln | 9 +++++++-- Setup/RevitBatchProcessor.iss | 2 +- 19 files changed, 38 insertions(+), 170 deletions(-) create mode 100644 BatchRvtAddin2015/Properties/GlobalAssemblyInfo.cs create mode 100644 Common/GlobalAssemblyInfo.cs diff --git a/BatchRevitDynamo/BatchRevitDynamo.csproj b/BatchRevitDynamo/BatchRevitDynamo.csproj index df6c813..77878bb 100644 --- a/BatchRevitDynamo/BatchRevitDynamo.csproj +++ b/BatchRevitDynamo/BatchRevitDynamo.csproj @@ -60,6 +60,9 @@ + + Properties\GlobalAssemblyInfo.cs + diff --git a/BatchRevitDynamo/Properties/AssemblyInfo.cs b/BatchRevitDynamo/Properties/AssemblyInfo.cs index 8a89a02..8ba4694 100644 --- a/BatchRevitDynamo/Properties/AssemblyInfo.cs +++ b/BatchRevitDynamo/Properties/AssemblyInfo.cs @@ -22,15 +22,5 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("b2fed296-9ea0-41dd-bb2f-951d481f527b")] -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] + + diff --git a/BatchRvt/BatchRvt.csproj b/BatchRvt/BatchRvt.csproj index 43ea401..cac2a1d 100644 --- a/BatchRvt/BatchRvt.csproj +++ b/BatchRvt/BatchRvt.csproj @@ -71,6 +71,9 @@ + + Properties\GlobalAssemblyInfo.cs + diff --git a/BatchRvt/Properties/AssemblyInfo.cs b/BatchRvt/Properties/AssemblyInfo.cs index 22337d5..0549e33 100644 --- a/BatchRvt/Properties/AssemblyInfo.cs +++ b/BatchRvt/Properties/AssemblyInfo.cs @@ -40,16 +40,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("4dd28256-d644-4b56-9eba-75ee51c11119")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BatchRvtAddin2015/Properties/AssemblyInfo.cs b/BatchRvtAddin2015/Properties/AssemblyInfo.cs index a356fb7..8866bb1 100644 --- a/BatchRvtAddin2015/Properties/AssemblyInfo.cs +++ b/BatchRvtAddin2015/Properties/AssemblyInfo.cs @@ -40,16 +40,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("9226492c-cf44-479b-b2c6-1fa3ea2be6eb")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BatchRvtAddin2015/Properties/GlobalAssemblyInfo.cs b/BatchRvtAddin2015/Properties/GlobalAssemblyInfo.cs new file mode 100644 index 0000000..f559471 --- /dev/null +++ b/BatchRvtAddin2015/Properties/GlobalAssemblyInfo.cs @@ -0,0 +1,11 @@ +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// + +[assembly: System.Reflection.AssemblyVersion("1.8.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersion("1.8.0.0")] +[assembly: System.Reflection.AssemblyFileVersion("1.8.0.0")] \ No newline at end of file diff --git a/BatchRvtAddin2016/Properties/AssemblyInfo.cs b/BatchRvtAddin2016/Properties/AssemblyInfo.cs index 06ae304..669b5ee 100644 --- a/BatchRvtAddin2016/Properties/AssemblyInfo.cs +++ b/BatchRvtAddin2016/Properties/AssemblyInfo.cs @@ -40,16 +40,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("8add8aeb-9baa-47d6-b52d-12e5e0eadacf")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BatchRvtAddin2017/Properties/AssemblyInfo.cs b/BatchRvtAddin2017/Properties/AssemblyInfo.cs index ed58fc6..6b420a8 100644 --- a/BatchRvtAddin2017/Properties/AssemblyInfo.cs +++ b/BatchRvtAddin2017/Properties/AssemblyInfo.cs @@ -40,16 +40,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("a943412b-0760-4e78-8f34-7f1dac012390")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BatchRvtAddin2018/Properties/AssemblyInfo.cs b/BatchRvtAddin2018/Properties/AssemblyInfo.cs index ed1e0df..0cd3d5a 100644 --- a/BatchRvtAddin2018/Properties/AssemblyInfo.cs +++ b/BatchRvtAddin2018/Properties/AssemblyInfo.cs @@ -40,16 +40,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("4deb0b67-8d04-4b95-8c01-9e26ac036c4f")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BatchRvtAddin2019/Properties/AssemblyInfo.cs b/BatchRvtAddin2019/Properties/AssemblyInfo.cs index 858c8c9..fa201f8 100644 --- a/BatchRvtAddin2019/Properties/AssemblyInfo.cs +++ b/BatchRvtAddin2019/Properties/AssemblyInfo.cs @@ -40,16 +40,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("62f91aa6-ac57-451e-a91c-719d5846d247")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BatchRvtAddin2020/Properties/AssemblyInfo.cs b/BatchRvtAddin2020/Properties/AssemblyInfo.cs index 488c96b..b5762d7 100644 --- a/BatchRvtAddin2020/Properties/AssemblyInfo.cs +++ b/BatchRvtAddin2020/Properties/AssemblyInfo.cs @@ -41,15 +41,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("03cfcdbe-9532-47dd-a84d-8ea9906808bf")] -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BatchRvtAddin2021/Properties/AssemblyInfo.cs b/BatchRvtAddin2021/Properties/AssemblyInfo.cs index 76048bf..e89bded 100644 --- a/BatchRvtAddin2021/Properties/AssemblyInfo.cs +++ b/BatchRvtAddin2021/Properties/AssemblyInfo.cs @@ -40,16 +40,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("1a6fe589-4b85-4094-afb7-48e7637b6ed0")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BatchRvtAddin2022/Properties/AssemblyInfo.cs b/BatchRvtAddin2022/Properties/AssemblyInfo.cs index 743ec9c..ddceacc 100644 --- a/BatchRvtAddin2022/Properties/AssemblyInfo.cs +++ b/BatchRvtAddin2022/Properties/AssemblyInfo.cs @@ -40,16 +40,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("1a6fe589-4b85-4094-afb7-48e7637b6ed0")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BatchRvtGUI/Properties/AssemblyInfo.cs b/BatchRvtGUI/Properties/AssemblyInfo.cs index 718d702..44e6c2e 100644 --- a/BatchRvtGUI/Properties/AssemblyInfo.cs +++ b/BatchRvtGUI/Properties/AssemblyInfo.cs @@ -40,16 +40,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("68c10075-6ee2-4174-bd4b-dd2518229a82")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BatchRvtScriptHost/Properties/AssemblyInfo.cs b/BatchRvtScriptHost/Properties/AssemblyInfo.cs index dae7d59..64add6d 100644 --- a/BatchRvtScriptHost/Properties/AssemblyInfo.cs +++ b/BatchRvtScriptHost/Properties/AssemblyInfo.cs @@ -40,16 +40,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("94ab4ba7-5cc2-40bc-9443-29026730d65f")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BatchRvtUtil/Properties/AssemblyInfo.cs b/BatchRvtUtil/Properties/AssemblyInfo.cs index fd45273..e85dca3 100644 --- a/BatchRvtUtil/Properties/AssemblyInfo.cs +++ b/BatchRvtUtil/Properties/AssemblyInfo.cs @@ -40,16 +40,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("c1f72c65-e710-4496-bbb2-40fefaea42c3")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Common/GlobalAssemblyInfo.cs b/Common/GlobalAssemblyInfo.cs new file mode 100644 index 0000000..f559471 --- /dev/null +++ b/Common/GlobalAssemblyInfo.cs @@ -0,0 +1,11 @@ +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// + +[assembly: System.Reflection.AssemblyVersion("1.8.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersion("1.8.0.0")] +[assembly: System.Reflection.AssemblyFileVersion("1.8.0.0")] \ No newline at end of file diff --git a/RevitBatchProcessor.sln b/RevitBatchProcessor.sln index 53f7cc0..265e471 100644 --- a/RevitBatchProcessor.sln +++ b/RevitBatchProcessor.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28803.156 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32328.378 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BatchRvt", "BatchRvt\BatchRvt.csproj", "{C877620C-DE32-455C-BF21-8F3E73E9DF68}" ProjectSection(ProjectDependencies) = postProject @@ -39,6 +39,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BatchRvtAddin2021", "BatchR EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BatchRvtAddin2022", "BatchRvtAddin2022\BatchRvtAddin2022.csproj", "{5529D2BF-74BD-47A8-A6DE-37006AC07C0C}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{37C4B35E-EFC4-4DA0-A021-42DE0D98B525}" + ProjectSection(SolutionItems) = preProject + Common\GlobalAssemblyInfo.cs = Common\GlobalAssemblyInfo.cs + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 diff --git a/Setup/RevitBatchProcessor.iss b/Setup/RevitBatchProcessor.iss index 7533cca..5ee1933 100644 --- a/Setup/RevitBatchProcessor.iss +++ b/Setup/RevitBatchProcessor.iss @@ -1,5 +1,5 @@ #define AppName "Revit Batch Processor" -#define AppVersion "1.7.0" +#define AppVersion "1.8.0" [Setup] AppName={#AppName} From 9199f374dfa7c5927efa8d076708e9ca320bc8c7 Mon Sep 17 00:00:00 2001 From: punderscoresmithuk <51383696+punderscoresmithuk@users.noreply.github.com> Date: Tue, 9 Aug 2022 12:33:55 +1000 Subject: [PATCH 8/8] Updates version no Adds a GlobalAssemblyInfo.cs file and links all project's properties to it to control the version no in one place --- BatchRvtAddin2015/BatchRvtAddin2015.csproj | 1 + BatchRvtAddin2016/BatchRvtAddin2016.csproj | 3 +++ BatchRvtAddin2017/BatchRvtAddin2017.csproj | 3 +++ BatchRvtAddin2018/BatchRvtAddin2018.csproj | 3 +++ BatchRvtAddin2019/BatchRvtAddin2019.csproj | 3 +++ BatchRvtAddin2020/BatchRvtAddin2020.csproj | 3 +++ BatchRvtAddin2021/BatchRvtAddin2021.csproj | 3 +++ BatchRvtAddin2022/BatchRvtAddin2022.csproj | 3 +++ BatchRvtGUI/BatchRvtGUI.csproj | 3 +++ BatchRvtScriptHost/BatchRvtScriptHost.csproj | 3 +++ BatchRvtUtil/BatchRvtUtil.csproj | 3 +++ 11 files changed, 31 insertions(+) diff --git a/BatchRvtAddin2015/BatchRvtAddin2015.csproj b/BatchRvtAddin2015/BatchRvtAddin2015.csproj index eb1caff..f856aa8 100644 --- a/BatchRvtAddin2015/BatchRvtAddin2015.csproj +++ b/BatchRvtAddin2015/BatchRvtAddin2015.csproj @@ -72,6 +72,7 @@ + diff --git a/BatchRvtAddin2016/BatchRvtAddin2016.csproj b/BatchRvtAddin2016/BatchRvtAddin2016.csproj index 8613da5..a291f67 100644 --- a/BatchRvtAddin2016/BatchRvtAddin2016.csproj +++ b/BatchRvtAddin2016/BatchRvtAddin2016.csproj @@ -70,6 +70,9 @@ + + Properties\GlobalAssemblyInfo.cs + diff --git a/BatchRvtAddin2017/BatchRvtAddin2017.csproj b/BatchRvtAddin2017/BatchRvtAddin2017.csproj index 29b8bb5..cd6d4a5 100644 --- a/BatchRvtAddin2017/BatchRvtAddin2017.csproj +++ b/BatchRvtAddin2017/BatchRvtAddin2017.csproj @@ -71,6 +71,9 @@ + + Properties\GlobalAssemblyInfo.cs + diff --git a/BatchRvtAddin2018/BatchRvtAddin2018.csproj b/BatchRvtAddin2018/BatchRvtAddin2018.csproj index ef709ca..c7c34f1 100644 --- a/BatchRvtAddin2018/BatchRvtAddin2018.csproj +++ b/BatchRvtAddin2018/BatchRvtAddin2018.csproj @@ -71,6 +71,9 @@ + + Properties\GlobalAssemblyInfo.cs + diff --git a/BatchRvtAddin2019/BatchRvtAddin2019.csproj b/BatchRvtAddin2019/BatchRvtAddin2019.csproj index 6634497..828708e 100644 --- a/BatchRvtAddin2019/BatchRvtAddin2019.csproj +++ b/BatchRvtAddin2019/BatchRvtAddin2019.csproj @@ -66,6 +66,9 @@ + + Properties\GlobalAssemblyInfo.cs + diff --git a/BatchRvtAddin2020/BatchRvtAddin2020.csproj b/BatchRvtAddin2020/BatchRvtAddin2020.csproj index bc60016..4638e8f 100644 --- a/BatchRvtAddin2020/BatchRvtAddin2020.csproj +++ b/BatchRvtAddin2020/BatchRvtAddin2020.csproj @@ -61,6 +61,9 @@ + + Properties\GlobalAssemblyInfo.cs + diff --git a/BatchRvtAddin2021/BatchRvtAddin2021.csproj b/BatchRvtAddin2021/BatchRvtAddin2021.csproj index e83cc0f..9d93e49 100644 --- a/BatchRvtAddin2021/BatchRvtAddin2021.csproj +++ b/BatchRvtAddin2021/BatchRvtAddin2021.csproj @@ -68,6 +68,9 @@ + + Properties\GlobalAssemblyInfo.cs + diff --git a/BatchRvtAddin2022/BatchRvtAddin2022.csproj b/BatchRvtAddin2022/BatchRvtAddin2022.csproj index 9d5e74c..178517b 100644 --- a/BatchRvtAddin2022/BatchRvtAddin2022.csproj +++ b/BatchRvtAddin2022/BatchRvtAddin2022.csproj @@ -68,6 +68,9 @@ + + Properties\GlobalAssemblyInfo.cs + diff --git a/BatchRvtGUI/BatchRvtGUI.csproj b/BatchRvtGUI/BatchRvtGUI.csproj index 8a7e057..c71e4ce 100644 --- a/BatchRvtGUI/BatchRvtGUI.csproj +++ b/BatchRvtGUI/BatchRvtGUI.csproj @@ -78,6 +78,9 @@ + + Properties\GlobalAssemblyInfo.cs + Form diff --git a/BatchRvtScriptHost/BatchRvtScriptHost.csproj b/BatchRvtScriptHost/BatchRvtScriptHost.csproj index c35c8b0..4f26cb6 100644 --- a/BatchRvtScriptHost/BatchRvtScriptHost.csproj +++ b/BatchRvtScriptHost/BatchRvtScriptHost.csproj @@ -61,6 +61,9 @@ + + Properties\GlobalAssemblyInfo.cs + diff --git a/BatchRvtUtil/BatchRvtUtil.csproj b/BatchRvtUtil/BatchRvtUtil.csproj index 496af25..7433e94 100644 --- a/BatchRvtUtil/BatchRvtUtil.csproj +++ b/BatchRvtUtil/BatchRvtUtil.csproj @@ -61,6 +61,9 @@ + + Properties\GlobalAssemblyInfo.cs +