Skip to content

Commit 72084d7

Browse files
authored
Merge pull request #792 from Autodesk/babio/24_2_2_update
IFC 24.2.20 update
2 parents ae7f00e + 0f514e9 commit 72084d7

File tree

126 files changed

+10321
-7812
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+10321
-7812
lines changed
Binary file not shown.

Install/Program Files to Install/bundle/Contents/Resources/ADSKIFCExporterHelp.htm

+67
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,73 @@ <h3>Support Information</h3>
236236
<p>or if you have an inquiry specific to this add-in, send us an e-mail to: <a href="mailto:[email protected]">[email protected]</a></p>
237237
<h2 id="VersionHistory" name="VersionHistory">Version History</h2>
238238

239+
<div class="version">24.2.20.0</div><div class="versioninfo-bullet">
240+
<br><p>
241+
General:
242+
<ul>
243+
<li>This is the an update of IFC Exporter for Revit 2024.
244+
<li>It contains a various improvements and bug fixes for the basic Revit 2024.
245+
</ul>
246+
</p>
247+
<br>
248+
<p>
249+
Improvements:
250+
<ul>
251+
<li>Added filename to the journal when export IFC if the default is used.
252+
<li>Added information to IfcOwnerHistory when exporting to IFC.
253+
<li>Add new user defined units export.
254+
<li>Added Revit Content Identifier to IFC export.
255+
<li>Added Width as an exported quantity to IFC for some assembly-based walls.
256+
<li>Allowed export of some elements to IFC4 Reference View [Structural] that had no material assignments.
257+
<li>Allowed some old IFC configuration settings to be upgraded.
258+
<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.
259+
<li>Implemented unique and consistent naming for IfcShapeAspect and IfcMaterialConstituent pairs.
260+
<li>Improved area and volume base quantities export for slabs as part of the roof.
261+
<li>Improved exporting all layers of some walls to IFC 4 when the option to split by level was chosen.
262+
<li>Improved stability of exporting to IFC when the Revit model has corrupted extensible storage data.
263+
<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.
264+
<li>Improved support for adding properties to PSet_ZoneCommon.
265+
<li>Improved the color assignments for some elements exported to IFC 4.
266+
<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.
267+
</ul>
268+
</p>
269+
<br>
270+
<p>
271+
Bug Fixes:
272+
<ul>
273+
<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.
274+
<li>Corrected placement of some families inside assemblies when exporting to IFC.
275+
<li>Fix IfcCountMeasure for IFC4x3.
276+
<li>Fixed a shifting of TriangulatedFaceSet geometry elements.
277+
<li>Fixed body representation for walls export to the IFC4RV.
278+
<li>Fixed bug with renaming IFC configuration makes the revit-session remember the old and the new IFC configuration.
279+
<li>Fixed classifications export for systems.
280+
<li>Fixed export of linked file orientation when exporting linked files to the same site.
281+
<li>Fixed export of model line placement elevation for 2D representation.
282+
<li>Fixed export of room elevation.
283+
<li>Fixed export of walls with openings placed next to clippings.
284+
<li>Fixed export of GrossArea to IFC4 QTO base quantities for Revit walls exported as IfcCovering.
285+
<li>Fixed a IsExternal parameter for windows exported to IFC.
286+
<li>Fixed a placement of beam openings.
287+
<li>Fixed the processing of the Export to IFC parameter for the assemblies.
288+
<li>Fixed Width parameter for IfcSlab and IfcCovering exported to IFC4 QTO base quantities.
289+
<li>Improved base quantities calculation for slab elements with openings.
290+
<li>Improved base quantities calculation for spatial elements.
291+
<li>Improved calculations of gross volume and gross side area when exporting some walls with openings to IFC 4.
292+
<li>Improved error handling for invalid Revit file with missing project base and survey points.
293+
<li>Improved export of some beams to IFC where the geometry was previously inverted in the IFC file.
294+
<li>Improved export of some beams with openings to IFC 4.
295+
<li>Improved export of some missing elements when exporting linked documents to IFC.
296+
<li>Improved the export of some walls that had doors or windows with multiple voids in the original family.
297+
<li>Improved performance of some elongated elements export to IFC 4.
298+
<li>Improved linking invalid IFC files with unbounded curves as part of their geometric representations.
299+
<li>Removed some IFC export configuration settings that didn't get properly renamed or deleted by Revit.
300+
</ul>
301+
</p>
302+
<br>
303+
</div>
304+
<br>
305+
239306
<div class="version">24.2.0.49</div><div class="versioninfo-bullet">
240307
<br><p>
241308
General:

Install/Program Files to Install/bundle/PackageContents.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<RuntimeRequirements OS="Win64" Platform="Revit" SeriesMin="R2024" SeriesMax="R2024" />
55
<Components Description="2024">
66
<RuntimeRequirements OS="Win64" Platform="Revit" SeriesMin="R2024" SeriesMax="R2024" />
7-
<ComponentEntry AppName="IFC For Revit 2024" Version="24.2.0" ModuleName="./Contents/2024/IFCExporterUIOverride.addin" AppDescription="IFC For Revit 2024" />
8-
<ComponentEntry AppName="IFC For Revit 2024" Version="24.2.0" ModuleName="./Contents/2024/Revit.IFC.addin" AppDescription="IFC For Revit 2024" />
7+
<ComponentEntry AppName="IFC For Revit 2024" Version="24.2.20" ModuleName="./Contents/2024/IFCExporterUIOverride.addin" AppDescription="IFC For Revit 2024" />
8+
<ComponentEntry AppName="IFC For Revit 2024" Version="24.2.20" ModuleName="./Contents/2024/Revit.IFC.addin" AppDescription="IFC For Revit 2024" />
99
</Components>
1010
</ApplicationPackage>

Install/RevitIFCSetupWix/Product.wxs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
33
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
44

5-
<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">
5+
<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">
66
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
77

88
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />

Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<ProductVersion>3.8</ProductVersion>
77
<ProjectGuid>7dfbd495-c588-4c7b-b8f6-5b793adb06f2</ProjectGuid>
88
<SchemaVersion>2.0</SchemaVersion>
9-
<OutputName>IFC for Revit 2024.2.0.49</OutputName>
9+
<OutputName>IFC for Revit 2024.2.20.0</OutputName>
1010
<OutputType>Package</OutputType>
1111
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
1212
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>

Install/RevitIFCSetupWix/buildInstaller.bat

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ rem It is necessary to add the Wix bin directory to the system path temporarily
1111
SET PATH=%PATH%;%WixRoot%
1212

1313
candle.exe -dProjectDir=%2 -ext WixUtilExtension %2Product.wxs
14-
light.exe -ext WixUtilExtension -out RevitIFC2024.2.0.msi product.wixobj -ext WixUIExtension
14+
light.exe -ext WixUtilExtension -out RevitIFC2024.2.20.msi product.wixobj -ext WixUIExtension
1515

16-
copy RevitIFC2024.2.0.msi %1..\Releasex64
17-
del RevitIFC2024.2.0.msi
16+
copy RevitIFC2024.2.20.msi %1..\Releasex64
17+
del RevitIFC2024.2.20.msi
1818

19-
echo %1..\Releasex64\RevitIFC2024.2.0.msi
19+
echo %1..\Releasex64\RevitIFC2024.2.20.msi

Source/IFCExporterUIOverride/IFCCommandOverrideApplication.cs

+7-12
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
using Autodesk.Revit.DB.ExternalService;
3434

3535

36-
using SaveFileDialog = Microsoft.Win32.SaveFileDialog;
3736
using View = Autodesk.Revit.DB.View;
3837

3938
using System.Windows.Forms;
@@ -61,7 +60,6 @@ public Result OnShutdown(UIControlledApplication application)
6160
{
6261
// Clean up
6362
m_ifcCommandBinding.Executed -= OnIFCExport;
64-
6563
return Result.Succeeded;
6664
}
6765

@@ -106,7 +104,7 @@ private void ApplicationInitialized(object sender, ApplicationInitializedEventAr
106104
entUIService.AddServer(browseIFCEntityServer);
107105
entUIService.SetActiveServer(browseIFCEntityServer.GetServerId());
108106
}
109-
catch {}
107+
catch { }
110108
}
111109
}
112110

@@ -255,7 +253,7 @@ public void OnIFCExport(object sender, CommandEventArgs args)
255253
// one of the exports. Prevent that by keeping track of the exported file names.
256254
ISet<string> exportedFileNames = new HashSet<string>();
257255

258-
bool exportLinks =
256+
bool exportLinks =
259257
selectedConfig.ExportLinkedFiles != LinkedFileExportAs.DontExport;
260258
bool exportSeparateLinks =
261259
selectedConfig.ExportLinkedFiles == LinkedFileExportAs.ExportAsSeparate;
@@ -295,10 +293,7 @@ public void OnIFCExport(object sender, CommandEventArgs args)
295293
selectedConfig.ActiveViewId = selectedConfig.UseActiveViewGeometry ? activeViewId : ElementId.InvalidElementId;
296294
selectedConfig.UpdateOptions(exportOptions, activeViewId);
297295

298-
// This will eventually become an option. Hardwired for testing to be
299-
// NOT exporting linked files as separate IFC files.
300-
301-
IDictionary<ElementId, string> linkGUIDsCache =
296+
IDictionary<ElementId, string> linkGUIDsCache =
302297
new Dictionary<ElementId, string>();
303298

304299
IDictionary<RevitLinkInstance, Transform> linkInstanceTranforms = null;
@@ -540,14 +535,14 @@ private string GetLinkFileName(Document linkDocument, string linkPathName)
540535
if (tr.HasReflection)
541536
{
542537
instHasReflection.Add(instanceId);
543-
numBadInstances++;
538+
numBadInstances++;
544539
continue;
545540
}
546541

547542
if (!MathUtil.IsAlmostEqual(tr.Determinant, 1.0))
548543
{
549544
scaledInst.Add(instanceId);
550-
numBadInstances++;
545+
numBadInstances++;
551546
continue;
552547
}
553548

@@ -584,10 +579,10 @@ public bool IsLinkVisible(Element element, View filterView)
584579
return false;
585580

586581
return filterView.IsElementVisibleInTemporaryViewMode(TemporaryViewMode.TemporaryHideIsolate, element.Id);
587-
}
582+
}
588583

589584
public void ExportLinkedDocuments(Document document, string fileName,
590-
IDictionary<ElementId, string> linkGUIDsCache,
585+
IDictionary<ElementId, string> linkGUIDsCache,
591586
IDictionary<RevitLinkInstance, Transform> idToTransform,
592587
IFCExportOptions exportOptions, ElementId originalFilterViewId)
593588
{

Source/IFCExporterUIOverride/IFCExport.xaml.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,8 @@ private void buttonExport_Click(object sender, RoutedEventArgs args)
507507
return;
508508
}
509509

510+
TheDocument.Application.WriteJournalComment(@"Jrn.Data ""File Name"", ""IDOK"", " + @"""" + textBoxSetupFileName.Text + @"""", true);
511+
510512
IFCExportConfiguration selectedConfig = GetSelectedConfiguration();
511513
if (OptionsUtil.ExportAs4DesignTransferView(selectedConfig.IFCVersion))
512514
{
@@ -527,7 +529,8 @@ private void buttonExport_Click(object sender, RoutedEventArgs args)
527529
selectedConfig = LastSelectedConfig[selectedConfig.Name];
528530

529531
// This check will be done only for IFC4 and above as this only affects IfcMapConversion use that starts in IFC4 onward
530-
if (!OptionsUtil.ExportAsOlderThanIFC4(selectedConfig.IFCVersion))
532+
if (!OptionsUtil.ExportAsOlderThanIFC4(selectedConfig.IFCVersion) &&
533+
!string.IsNullOrWhiteSpace(selectedConfig.GeoRefEPSGCode))
531534
{
532535
// Check whether the resulting offset (to wcs) will be too large due to geo-reference information, raise warning
533536
BasePoint surveyPoint = BasePoint.GetSurveyPoint(TheDocument);

Source/IFCExporterUIOverride/IFCExportConfiguration.cs

+18-7
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,23 @@ public class IFCExportConfiguration
5858
/// </summary>
5959
public IFCVersion IFCVersion { get; set; } = IFCVersion.IFC2x3CV2;
6060

61-
private KnownERNames exchangeRequirement = KnownERNames.NotDefined;
61+
private KnownERNames m_ExchangeRequirement = KnownERNames.NotDefined;
6262

6363
public KnownERNames ExchangeRequirement
6464
{
6565
get
6666
{
67-
return exchangeRequirement;
67+
return m_ExchangeRequirement;
6868
}
6969
set
7070
{
7171
if (IFCExchangeRequirements.ExchangeRequirements.ContainsKey(IFCVersion))
7272
{
7373
IList<KnownERNames> erList = IFCExchangeRequirements.ExchangeRequirements[IFCVersion];
7474
if (erList != null && erList.Contains(value))
75-
exchangeRequirement = value;
75+
{
76+
m_ExchangeRequirement = value;
77+
}
7678
}
7779
}
7880
}
@@ -286,6 +288,15 @@ public KnownERNames ExchangeRequirement
286288
/// </summary>
287289
public bool UseTypeNameOnlyForIfcType { get; set; } = false;
288290

291+
/// <summary>
292+
/// Don't create a container entity for floors and roofs unless exporting parts
293+
/// </summary>
294+
public bool ExportHostAsSingleEntity { get; set; } = false;
295+
296+
/// <summary>
297+
/// Use Author field in Project Information to set IfcOwnerHistory LastModified attribute
298+
/// </summary>
299+
public bool OwnerHistoryLastModified { get; set; } = false;
289300
/// <summary>
290301
/// Value indicating whether the IFC Entity Name will use visible Revit Name
291302
/// </summary>
@@ -593,7 +604,9 @@ public void UpdateBuiltInConfiguration(IFCExportConfiguration updatedConfig)
593604
/// <param name="filterViewId">The id of the view that will be used to select which elements to export.</param>
594605
public void UpdateOptions(IFCExportOptions options, ElementId filterViewId)
595606
{
596-
JavaScriptSerializer ser = new JavaScriptSerializer();
607+
JavaScriptSerializer ser = new JavaScriptSerializer();
608+
options.FilterViewId = VisibleElementsOfCurrentView ? filterViewId : ElementId.InvalidElementId;
609+
597610
foreach (var prop in GetType().GetProperties())
598611
{
599612
switch (prop.Name)
@@ -605,7 +618,7 @@ public void UpdateOptions(IFCExportOptions options, ElementId filterViewId)
605618
options.FileVersion = IFCVersion;
606619
break;
607620
case "ActivePhaseId":
608-
if (IFCPhaseAttributes.Validate(ActivePhaseId))
621+
if (options.FilterViewId == ElementId.InvalidElementId && IFCPhaseAttributes.Validate(ActivePhaseId))
609622
options.AddOption(prop.Name, ActivePhaseId.ToString());
610623
break;
611624
case "SpaceBoundaries":
@@ -632,8 +645,6 @@ public void UpdateOptions(IFCExportOptions options, ElementId filterViewId)
632645
break;
633646
}
634647
}
635-
636-
options.FilterViewId = VisibleElementsOfCurrentView ? filterViewId : ElementId.InvalidElementId;
637648
}
638649

639650

0 commit comments

Comments
 (0)