diff --git a/Install/Program Files to Install/Autodesk.SteelConnections.ASIFC.dll b/Install/Program Files to Install/Autodesk.SteelConnections.ASIFC.dll index 5d1825ae..40dfb8f3 100644 Binary files a/Install/Program Files to Install/Autodesk.SteelConnections.ASIFC.dll and b/Install/Program Files to Install/Autodesk.SteelConnections.ASIFC.dll differ diff --git a/Install/Program Files to Install/bundle/Contents/Resources/ADSKIFCExporterHelp.htm b/Install/Program Files to Install/bundle/Contents/Resources/ADSKIFCExporterHelp.htm index 4e267742..7fe0da32 100644 --- a/Install/Program Files to Install/bundle/Contents/Resources/ADSKIFCExporterHelp.htm +++ b/Install/Program Files to Install/bundle/Contents/Resources/ADSKIFCExporterHelp.htm @@ -236,6 +236,73 @@

Support Information

or if you have an inquiry specific to this add-in, send us an e-mail to: Revit.apps@autodesk.com

Version History

+
24.2.20.0
+

+ General: +

+

+
+

+ Improvements: +

+

+
+

+ Bug Fixes: +

+

+
+
+
+
24.2.0.49

General: diff --git a/Install/Program Files to Install/bundle/PackageContents.xml b/Install/Program Files to Install/bundle/PackageContents.xml index 3ec722c5..c3d6a9be 100644 --- a/Install/Program Files to Install/bundle/PackageContents.xml +++ b/Install/Program Files to Install/bundle/PackageContents.xml @@ -4,7 +4,7 @@ - - + + \ No newline at end of file diff --git a/Install/RevitIFCSetupWix/Product.wxs b/Install/RevitIFCSetupWix/Product.wxs index 32dd1740..ca94b1e4 100644 --- a/Install/RevitIFCSetupWix/Product.wxs +++ b/Install/RevitIFCSetupWix/Product.wxs @@ -2,7 +2,7 @@ - + diff --git a/Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj b/Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj index 4556867e..a6d1ef85 100644 --- a/Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj +++ b/Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj @@ -6,7 +6,7 @@ 3.8 7dfbd495-c588-4c7b-b8f6-5b793adb06f2 2.0 - IFC for Revit 2024.2.0.49 + IFC for Revit 2024.2.20.0 Package $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets diff --git a/Install/RevitIFCSetupWix/buildInstaller.bat b/Install/RevitIFCSetupWix/buildInstaller.bat index 4f114331..d304abe6 100644 --- a/Install/RevitIFCSetupWix/buildInstaller.bat +++ b/Install/RevitIFCSetupWix/buildInstaller.bat @@ -11,9 +11,9 @@ rem It is necessary to add the Wix bin directory to the system path temporarily SET PATH=%PATH%;%WixRoot% candle.exe -dProjectDir=%2 -ext WixUtilExtension %2Product.wxs -light.exe -ext WixUtilExtension -out RevitIFC2024.2.0.msi product.wixobj -ext WixUIExtension +light.exe -ext WixUtilExtension -out RevitIFC2024.2.20.msi product.wixobj -ext WixUIExtension -copy RevitIFC2024.2.0.msi %1..\Releasex64 -del RevitIFC2024.2.0.msi +copy RevitIFC2024.2.20.msi %1..\Releasex64 +del RevitIFC2024.2.20.msi -echo %1..\Releasex64\RevitIFC2024.2.0.msi +echo %1..\Releasex64\RevitIFC2024.2.20.msi diff --git a/Source/IFCExporterUIOverride/IFCCommandOverrideApplication.cs b/Source/IFCExporterUIOverride/IFCCommandOverrideApplication.cs index b33d30a1..7cd8cbe7 100644 --- a/Source/IFCExporterUIOverride/IFCCommandOverrideApplication.cs +++ b/Source/IFCExporterUIOverride/IFCCommandOverrideApplication.cs @@ -33,7 +33,6 @@ using Autodesk.Revit.DB.ExternalService; -using SaveFileDialog = Microsoft.Win32.SaveFileDialog; using View = Autodesk.Revit.DB.View; using System.Windows.Forms; @@ -61,7 +60,6 @@ public Result OnShutdown(UIControlledApplication application) { // Clean up m_ifcCommandBinding.Executed -= OnIFCExport; - return Result.Succeeded; } @@ -106,7 +104,7 @@ private void ApplicationInitialized(object sender, ApplicationInitializedEventAr entUIService.AddServer(browseIFCEntityServer); entUIService.SetActiveServer(browseIFCEntityServer.GetServerId()); } - catch {} + catch { } } } @@ -255,7 +253,7 @@ public void OnIFCExport(object sender, CommandEventArgs args) // one of the exports. Prevent that by keeping track of the exported file names. ISet exportedFileNames = new HashSet(); - bool exportLinks = + bool exportLinks = selectedConfig.ExportLinkedFiles != LinkedFileExportAs.DontExport; bool exportSeparateLinks = selectedConfig.ExportLinkedFiles == LinkedFileExportAs.ExportAsSeparate; @@ -295,10 +293,7 @@ public void OnIFCExport(object sender, CommandEventArgs args) selectedConfig.ActiveViewId = selectedConfig.UseActiveViewGeometry ? activeViewId : ElementId.InvalidElementId; selectedConfig.UpdateOptions(exportOptions, activeViewId); - // This will eventually become an option. Hardwired for testing to be - // NOT exporting linked files as separate IFC files. - - IDictionary linkGUIDsCache = + IDictionary linkGUIDsCache = new Dictionary(); IDictionary linkInstanceTranforms = null; @@ -540,14 +535,14 @@ private string GetLinkFileName(Document linkDocument, string linkPathName) if (tr.HasReflection) { instHasReflection.Add(instanceId); - numBadInstances++; + numBadInstances++; continue; } if (!MathUtil.IsAlmostEqual(tr.Determinant, 1.0)) { scaledInst.Add(instanceId); - numBadInstances++; + numBadInstances++; continue; } @@ -584,10 +579,10 @@ public bool IsLinkVisible(Element element, View filterView) return false; return filterView.IsElementVisibleInTemporaryViewMode(TemporaryViewMode.TemporaryHideIsolate, element.Id); - } + } public void ExportLinkedDocuments(Document document, string fileName, - IDictionary linkGUIDsCache, + IDictionary linkGUIDsCache, IDictionary idToTransform, IFCExportOptions exportOptions, ElementId originalFilterViewId) { diff --git a/Source/IFCExporterUIOverride/IFCExport.xaml.cs b/Source/IFCExporterUIOverride/IFCExport.xaml.cs index 820e867e..3a6508a4 100644 --- a/Source/IFCExporterUIOverride/IFCExport.xaml.cs +++ b/Source/IFCExporterUIOverride/IFCExport.xaml.cs @@ -507,6 +507,8 @@ private void buttonExport_Click(object sender, RoutedEventArgs args) return; } + TheDocument.Application.WriteJournalComment(@"Jrn.Data ""File Name"", ""IDOK"", " + @"""" + textBoxSetupFileName.Text + @"""", true); + IFCExportConfiguration selectedConfig = GetSelectedConfiguration(); if (OptionsUtil.ExportAs4DesignTransferView(selectedConfig.IFCVersion)) { @@ -527,7 +529,8 @@ private void buttonExport_Click(object sender, RoutedEventArgs args) selectedConfig = LastSelectedConfig[selectedConfig.Name]; // This check will be done only for IFC4 and above as this only affects IfcMapConversion use that starts in IFC4 onward - if (!OptionsUtil.ExportAsOlderThanIFC4(selectedConfig.IFCVersion)) + if (!OptionsUtil.ExportAsOlderThanIFC4(selectedConfig.IFCVersion) && + !string.IsNullOrWhiteSpace(selectedConfig.GeoRefEPSGCode)) { // Check whether the resulting offset (to wcs) will be too large due to geo-reference information, raise warning BasePoint surveyPoint = BasePoint.GetSurveyPoint(TheDocument); diff --git a/Source/IFCExporterUIOverride/IFCExportConfiguration.cs b/Source/IFCExporterUIOverride/IFCExportConfiguration.cs index 89035c52..a108d108 100644 --- a/Source/IFCExporterUIOverride/IFCExportConfiguration.cs +++ b/Source/IFCExporterUIOverride/IFCExportConfiguration.cs @@ -58,13 +58,13 @@ public class IFCExportConfiguration /// public IFCVersion IFCVersion { get; set; } = IFCVersion.IFC2x3CV2; - private KnownERNames exchangeRequirement = KnownERNames.NotDefined; + private KnownERNames m_ExchangeRequirement = KnownERNames.NotDefined; public KnownERNames ExchangeRequirement { get { - return exchangeRequirement; + return m_ExchangeRequirement; } set { @@ -72,7 +72,9 @@ public KnownERNames ExchangeRequirement { IList erList = IFCExchangeRequirements.ExchangeRequirements[IFCVersion]; if (erList != null && erList.Contains(value)) - exchangeRequirement = value; + { + m_ExchangeRequirement = value; + } } } } @@ -286,6 +288,15 @@ public KnownERNames ExchangeRequirement /// public bool UseTypeNameOnlyForIfcType { get; set; } = false; + ///

+ /// Don't create a container entity for floors and roofs unless exporting parts + /// + public bool ExportHostAsSingleEntity { get; set; } = false; + + /// + /// Use Author field in Project Information to set IfcOwnerHistory LastModified attribute + /// + public bool OwnerHistoryLastModified { get; set; } = false; /// /// Value indicating whether the IFC Entity Name will use visible Revit Name /// @@ -593,7 +604,9 @@ public void UpdateBuiltInConfiguration(IFCExportConfiguration updatedConfig) /// The id of the view that will be used to select which elements to export. public void UpdateOptions(IFCExportOptions options, ElementId filterViewId) { - JavaScriptSerializer ser = new JavaScriptSerializer(); + JavaScriptSerializer ser = new JavaScriptSerializer(); + options.FilterViewId = VisibleElementsOfCurrentView ? filterViewId : ElementId.InvalidElementId; + foreach (var prop in GetType().GetProperties()) { switch (prop.Name) @@ -605,7 +618,7 @@ public void UpdateOptions(IFCExportOptions options, ElementId filterViewId) options.FileVersion = IFCVersion; break; case "ActivePhaseId": - if (IFCPhaseAttributes.Validate(ActivePhaseId)) + if (options.FilterViewId == ElementId.InvalidElementId && IFCPhaseAttributes.Validate(ActivePhaseId)) options.AddOption(prop.Name, ActivePhaseId.ToString()); break; case "SpaceBoundaries": @@ -632,8 +645,6 @@ public void UpdateOptions(IFCExportOptions options, ElementId filterViewId) break; } } - - options.FilterViewId = VisibleElementsOfCurrentView ? filterViewId : ElementId.InvalidElementId; } diff --git a/Source/IFCExporterUIOverride/IFCExportConfigurationsMap.cs b/Source/IFCExporterUIOverride/IFCExportConfigurationsMap.cs index 6e86b488..19e7e3c4 100644 --- a/Source/IFCExporterUIOverride/IFCExportConfigurationsMap.cs +++ b/Source/IFCExporterUIOverride/IFCExportConfigurationsMap.cs @@ -202,6 +202,9 @@ public void AddSavedConfigurations() Field fieldTessellationLevelOfDetail = m_OldSchema.GetField(s_setupTessellationLevelOfDetail); if (fieldTessellationLevelOfDetail != null) configuration.TessellationLevelOfDetail = configEntity.Get(s_setupTessellationLevelOfDetail); + Field fieldOwnerHistoryLastModified = m_OldSchema.GetField(s_ownerHistoryLastModified); + if (fieldOwnerHistoryLastModified != null) + configuration.OwnerHistoryLastModified = configEntity.Get(s_ownerHistoryLastModified); AddOrReplace(configuration); } @@ -286,6 +289,8 @@ public void AddSavedConfigurations() configuration.UseVisibleRevitNameAsEntityName = bool.Parse(configMap[s_useVisibleRevitNameAsEntityName]); if (configMap.ContainsKey(s_useOnlyTriangulation)) configuration.UseOnlyTriangulation = bool.Parse(configMap[s_useOnlyTriangulation]); + if (configMap.ContainsKey(s_ownerHistoryLastModified)) + configuration.OwnerHistoryLastModified = bool.Parse(configMap[s_ownerHistoryLastModified]); if (configMap.ContainsKey(s_setupTessellationLevelOfDetail)) configuration.TessellationLevelOfDetail = double.Parse(configMap[s_setupTessellationLevelOfDetail]); if (configMap.ContainsKey(s_setupSitePlacement)) @@ -333,6 +338,7 @@ public void AddSavedConfigurations() catch (Exception) { // don't skip all configurations if an exception occurs for one + IFCCommandOverrideApplication.TheDocument.Application.WriteJournalComment("IFC error: Cannot read IFCExportConfigurationMap schema", true); } } } @@ -393,6 +399,7 @@ public void AddSavedConfigurations() private const string s_setupSitePlacement = "SitePlacement"; private const string s_useTypeNameOnlyForIfcType = "UseTypeNameOnlyForIfcType"; private const string s_useVisibleRevitNameAsEntityName = "UseVisibleRevitNameAsEntityName"; + private const string s_ownerHistoryLastModified = "OwnerHistoryLastModified"; // Used for COBie 2.4 private const string s_cobieCompanyInfo = "COBieCompanyInfo"; private const string s_cobieProjectInfo = "COBieProjectInfo"; @@ -514,52 +521,48 @@ public void UpdateSavedConfigurations(IFCExportConfigurationsMap initialConfigs) m_jsonSchema = builder.Finish(); } - // It won't start any transaction if there is no change to the configurations - if (setupsToSave.Count > 0) + // Overwrite all saved configs with the new list + Transaction transaction = new Transaction(IFCCommandOverrideApplication.TheDocument, Properties.Resources.UpdateExportSetups); + try { - // Overwrite all saved configs with the new list - Transaction transaction = new Transaction(IFCCommandOverrideApplication.TheDocument, Properties.Resources.UpdateExportSetups); - try + transaction.Start(Properties.Resources.SaveConfigurationChanges); + IList savedConfigurations = GetSavedConfigurations(m_jsonSchema); + int savedConfigurationCount = savedConfigurations.Count(); + int savedConfigurationIndex = 0; + foreach (IFCExportConfiguration configuration in setupsToSave) { - transaction.Start(Properties.Resources.SaveConfigurationChanges); - IList savedConfigurations = GetSavedConfigurations(m_jsonSchema); - int savedConfigurationCount = savedConfigurations.Count(); - int savedConfigurationIndex = 0; - foreach (IFCExportConfiguration configuration in setupsToSave) + DataStorage configStorage; + if (savedConfigurationIndex >= savedConfigurationCount) { - DataStorage configStorage; - if (savedConfigurationIndex >= savedConfigurationCount) - { - configStorage = DataStorage.Create(IFCCommandOverrideApplication.TheDocument); - } - else - { - configStorage = savedConfigurations[savedConfigurationIndex]; - savedConfigurationIndex++; - } - - Entity mapEntity = new Entity(m_jsonSchema); - string configData = configuration.SerializeConfigToJson(); - mapEntity.Set(s_configMapField, configData); - configStorage.SetEntity(mapEntity); + configStorage = DataStorage.Create(IFCCommandOverrideApplication.TheDocument); } - - List elementsToDelete = new List(); - for (; savedConfigurationIndex < savedConfigurationCount; savedConfigurationIndex++) + else { - DataStorage configStorage = savedConfigurations[savedConfigurationIndex]; - elementsToDelete.Add(configStorage.Id); + configStorage = savedConfigurations[savedConfigurationIndex]; + savedConfigurationIndex++; } - if (elementsToDelete.Count > 0) - IFCCommandOverrideApplication.TheDocument.Delete(elementsToDelete); - - transaction.Commit(); + + Entity mapEntity = new Entity(m_jsonSchema); + string configData = configuration.SerializeConfigToJson(); + mapEntity.Set(s_configMapField, configData); + configStorage.SetEntity(mapEntity); } - catch (System.Exception) + + List elementsToDelete = new List(); + for (; savedConfigurationIndex < savedConfigurationCount; savedConfigurationIndex++) { - if (transaction.HasStarted()) - transaction.RollBack(); + DataStorage configStorage = savedConfigurations[savedConfigurationIndex]; + elementsToDelete.Add(configStorage.Id); } + if (elementsToDelete.Count > 0) + IFCCommandOverrideApplication.TheDocument.Delete(elementsToDelete); + + transaction.Commit(); + } + catch (System.Exception) + { + if (transaction.HasStarted()) + transaction.RollBack(); } } diff --git a/Source/IFCExporterUIOverride/IFCExporterUIOverride.csproj b/Source/IFCExporterUIOverride/IFCExporterUIOverride.csproj index bdccdf2f..2fe2f263 100644 --- a/Source/IFCExporterUIOverride/IFCExporterUIOverride.csproj +++ b/Source/IFCExporterUIOverride/IFCExporterUIOverride.csproj @@ -47,16 +47,20 @@ bin\Releasex64\ - + + False ..\..\..\..\Program Files\Autodesk\Revit 2024\Autodesk.UI.Windows.dll - + + False ..\..\..\..\Program Files\Autodesk\Revit 2024\RevitAPI.dll - + + False ..\..\..\..\Program Files\Autodesk\Revit 2024\RevitAPIIFC.dll - + + False ..\..\..\..\Program Files\Autodesk\Revit 2024\RevitAPIUI.dll @@ -73,7 +77,8 @@ 4.0 - + + False ..\..\..\..\Program Files\Autodesk\Revit 2024\UserInterfaceUtility.dll diff --git a/Source/IFCExporterUIOverride/IFCExporterUIWindow.xaml b/Source/IFCExporterUIOverride/IFCExporterUIWindow.xaml index be07def3..0aa42857 100644 --- a/Source/IFCExporterUIOverride/IFCExporterUIWindow.xaml +++ b/Source/IFCExporterUIOverride/IFCExporterUIWindow.xaml @@ -84,7 +84,8 @@ -