Skip to content

Commit

Permalink
Merge pull request #792 from Autodesk/babio/24_2_2_update
Browse files Browse the repository at this point in the history
IFC 24.2.20 update
  • Loading branch information
o-babii authored Aug 5, 2024
2 parents ae7f00e + 0f514e9 commit 72084d7
Show file tree
Hide file tree
Showing 126 changed files with 10,321 additions and 7,812 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,73 @@ <h3>Support Information</h3>
<p>or if you have an inquiry specific to this add-in, send us an e-mail to: <a href="mailto:Revit.apps@autodesk.com">Revit.apps@autodesk.com</a></p>
<h2 id="VersionHistory" name="VersionHistory">Version History</h2>

<div class="version">24.2.20.0</div><div class="versioninfo-bullet">
<br><p>
General:
<ul>
<li>This is the an update of IFC Exporter for Revit 2024.
<li>It contains a various improvements and bug fixes for the basic Revit 2024.
</ul>
</p>
<br>
<p>
Improvements:
<ul>
<li>Added filename to the journal when export IFC if the default is used.
<li>Added information to IfcOwnerHistory when exporting to IFC.
<li>Add new user defined units export.
<li>Added Revit Content Identifier to IFC export.
<li>Added Width as an exported quantity to IFC for some assembly-based walls.
<li>Allowed export of some elements to IFC4 Reference View [Structural] that had no material assignments.
<li>Allowed some old IFC configuration settings to be upgraded.
<li>Changed the behavior of the warning message when exporting to IFC 4 if elements in a Revit model are far from the origin so that the warning appears only if an EPSG code is also set.
<li>Implemented unique and consistent naming for IfcShapeAspect and IfcMaterialConstituent pairs.
<li>Improved area and volume base quantities export for slabs as part of the roof.
<li>Improved exporting all layers of some walls to IFC 4 when the option to split by level was chosen.
<li>Improved stability of exporting to IFC when the Revit model has corrupted extensible storage data.
<li>Improved stability when exporting files to IFC with some short, invalid IFC entity names set in the Export to IFC As and Export Type to IFC As parameters.
<li>Improved support for adding properties to PSet_ZoneCommon.
<li>Improved the color assignments for some elements exported to IFC 4.
<li>Improved the export of current view only IFC files when the phase of the view has changed since it was first set in the IFC export settings.
</ul>
</p>
<br>
<p>
Bug Fixes:
<ul>
<li>Added type parameter set export for Revit elements whose corresponding IFC 2x3 entity didn't have a type entity associated with it, such as ramps, stairs, and footings.
<li>Corrected placement of some families inside assemblies when exporting to IFC.
<li>Fix IfcCountMeasure for IFC4x3.
<li>Fixed a shifting of TriangulatedFaceSet geometry elements.
<li>Fixed body representation for walls export to the IFC4RV.
<li>Fixed bug with renaming IFC configuration makes the revit-session remember the old and the new IFC configuration.
<li>Fixed classifications export for systems.
<li>Fixed export of linked file orientation when exporting linked files to the same site.
<li>Fixed export of model line placement elevation for 2D representation.
<li>Fixed export of room elevation.
<li>Fixed export of walls with openings placed next to clippings.
<li>Fixed export of GrossArea to IFC4 QTO base quantities for Revit walls exported as IfcCovering.
<li>Fixed a IsExternal parameter for windows exported to IFC.
<li>Fixed a placement of beam openings.
<li>Fixed the processing of the Export to IFC parameter for the assemblies.
<li>Fixed Width parameter for IfcSlab and IfcCovering exported to IFC4 QTO base quantities.
<li>Improved base quantities calculation for slab elements with openings.
<li>Improved base quantities calculation for spatial elements.
<li>Improved calculations of gross volume and gross side area when exporting some walls with openings to IFC 4.
<li>Improved error handling for invalid Revit file with missing project base and survey points.
<li>Improved export of some beams to IFC where the geometry was previously inverted in the IFC file.
<li>Improved export of some beams with openings to IFC 4.
<li>Improved export of some missing elements when exporting linked documents to IFC.
<li>Improved the export of some walls that had doors or windows with multiple voids in the original family.
<li>Improved performance of some elongated elements export to IFC 4.
<li>Improved linking invalid IFC files with unbounded curves as part of their geometric representations.
<li>Removed some IFC export configuration settings that didn't get properly renamed or deleted by Revit.
</ul>
</p>
<br>
</div>
<br>

<div class="version">24.2.0.49</div><div class="versioninfo-bullet">
<br><p>
General:
Expand Down
4 changes: 2 additions & 2 deletions Install/Program Files to Install/bundle/PackageContents.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RuntimeRequirements OS="Win64" Platform="Revit" SeriesMin="R2024" SeriesMax="R2024" />
<Components Description="2024">
<RuntimeRequirements OS="Win64" Platform="Revit" SeriesMin="R2024" SeriesMax="R2024" />
<ComponentEntry AppName="IFC For Revit 2024" Version="24.2.0" ModuleName="./Contents/2024/IFCExporterUIOverride.addin" AppDescription="IFC For Revit 2024" />
<ComponentEntry AppName="IFC For Revit 2024" Version="24.2.0" ModuleName="./Contents/2024/Revit.IFC.addin" AppDescription="IFC For Revit 2024" />
<ComponentEntry AppName="IFC For Revit 2024" Version="24.2.20" ModuleName="./Contents/2024/IFCExporterUIOverride.addin" AppDescription="IFC For Revit 2024" />
<ComponentEntry AppName="IFC For Revit 2024" Version="24.2.20" ModuleName="./Contents/2024/Revit.IFC.addin" AppDescription="IFC For Revit 2024" />
</Components>
</ApplicationPackage>
2 changes: 1 addition & 1 deletion Install/RevitIFCSetupWix/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

<Product Id="1A9C2C21-2420-42D2-0000-992E73C12400" Name="Revit IFC 2024" Language="1033" Version="24.2.0.0" Manufacturer="Autodesk" UpgradeCode="1A9C2C21-24B8-42D2-0000-992E73C11B3F">
<Product Id="1A9C2C21-2422-42D2-0000-992E73C12400" Name="Revit IFC 2024" Language="1033" Version="24.2.20.0" Manufacturer="Autodesk" UpgradeCode="1A9C2C21-24B8-42D2-0000-992E73C11B3F">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
Expand Down
2 changes: 1 addition & 1 deletion Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ProductVersion>3.8</ProductVersion>
<ProjectGuid>7dfbd495-c588-4c7b-b8f6-5b793adb06f2</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>IFC for Revit 2024.2.0.49</OutputName>
<OutputName>IFC for Revit 2024.2.20.0</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
Expand Down
8 changes: 4 additions & 4 deletions Install/RevitIFCSetupWix/buildInstaller.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 7 additions & 12 deletions Source/IFCExporterUIOverride/IFCCommandOverrideApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
using Autodesk.Revit.DB.ExternalService;


using SaveFileDialog = Microsoft.Win32.SaveFileDialog;
using View = Autodesk.Revit.DB.View;

using System.Windows.Forms;
Expand Down Expand Up @@ -61,7 +60,6 @@ public Result OnShutdown(UIControlledApplication application)
{
// Clean up
m_ifcCommandBinding.Executed -= OnIFCExport;

return Result.Succeeded;
}

Expand Down Expand Up @@ -106,7 +104,7 @@ private void ApplicationInitialized(object sender, ApplicationInitializedEventAr
entUIService.AddServer(browseIFCEntityServer);
entUIService.SetActiveServer(browseIFCEntityServer.GetServerId());
}
catch {}
catch { }
}
}

Expand Down Expand Up @@ -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<string> exportedFileNames = new HashSet<string>();

bool exportLinks =
bool exportLinks =
selectedConfig.ExportLinkedFiles != LinkedFileExportAs.DontExport;
bool exportSeparateLinks =
selectedConfig.ExportLinkedFiles == LinkedFileExportAs.ExportAsSeparate;
Expand Down Expand Up @@ -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<ElementId, string> linkGUIDsCache =
IDictionary<ElementId, string> linkGUIDsCache =
new Dictionary<ElementId, string>();

IDictionary<RevitLinkInstance, Transform> linkInstanceTranforms = null;
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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<ElementId, string> linkGUIDsCache,
IDictionary<ElementId, string> linkGUIDsCache,
IDictionary<RevitLinkInstance, Transform> idToTransform,
IFCExportOptions exportOptions, ElementId originalFilterViewId)
{
Expand Down
5 changes: 4 additions & 1 deletion Source/IFCExporterUIOverride/IFCExport.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand All @@ -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);
Expand Down
25 changes: 18 additions & 7 deletions Source/IFCExporterUIOverride/IFCExportConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,23 @@ public class IFCExportConfiguration
/// </summary>
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
{
if (IFCExchangeRequirements.ExchangeRequirements.ContainsKey(IFCVersion))
{
IList<KnownERNames> erList = IFCExchangeRequirements.ExchangeRequirements[IFCVersion];
if (erList != null && erList.Contains(value))
exchangeRequirement = value;
{
m_ExchangeRequirement = value;
}
}
}
}
Expand Down Expand Up @@ -286,6 +288,15 @@ public KnownERNames ExchangeRequirement
/// </summary>
public bool UseTypeNameOnlyForIfcType { get; set; } = false;

/// <summary>
/// Don't create a container entity for floors and roofs unless exporting parts
/// </summary>
public bool ExportHostAsSingleEntity { get; set; } = false;

/// <summary>
/// Use Author field in Project Information to set IfcOwnerHistory LastModified attribute
/// </summary>
public bool OwnerHistoryLastModified { get; set; } = false;
/// <summary>
/// Value indicating whether the IFC Entity Name will use visible Revit Name
/// </summary>
Expand Down Expand Up @@ -593,7 +604,9 @@ public void UpdateBuiltInConfiguration(IFCExportConfiguration updatedConfig)
/// <param name="filterViewId">The id of the view that will be used to select which elements to export.</param>
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)
Expand All @@ -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":
Expand All @@ -632,8 +645,6 @@ public void UpdateOptions(IFCExportOptions options, ElementId filterViewId)
break;
}
}

options.FilterViewId = VisibleElementsOfCurrentView ? filterViewId : ElementId.InvalidElementId;
}


Expand Down
Loading

0 comments on commit 72084d7

Please sign in to comment.