Skip to content

Commit

Permalink
Merge pull request #665 from Autodesk/babio/update_23_3_1
Browse files Browse the repository at this point in the history
23_3_1 update
  • Loading branch information
o-babii authored Jul 31, 2023
2 parents 720d041 + a30c82d commit b647e72
Show file tree
Hide file tree
Showing 16 changed files with 109 additions and 32 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
# Pressure, Ratio, Real, Text, ThermalTransmittance, ThermodynamicTemperature, Volume,
# VolumetricFlowRate
#
# Since 23.3.0, type properties are not exported in case they are not specified in the user-defined property sets file.
# To export type properties for the IFCElement, for example,
# a user should include "IFCElementType" in the proper .txt file.
#
# Example property set definition for COBie:
#
#PropertySet: COBie_Specification T IfcElementType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,26 @@ <h3>Support Information</h3>
<h2 id="VersionHistory" name="VersionHistory">Version History</h2>

<div class="versionset">
<div class="version">23.3.1.0</div><div class="versioninfo-bullet">
<br><p>
General:
<ul>
<li>This is the first version of IFC Exporter for Revit 2023.
<li>It contains a various improvements and bug fixes for the basic Revit 2023.
</ul>
</p>
<br>
<p>
Bug Fixes:
<ul>
<li>Fixed bug with "Ifc Export As" cannot be opened.
<li>Fix sketch-based openings in sloped slabs.
<li>Fixed placement of some specific wall sweep elements.
</ul>
</p>
<br>
</div>
<br>
<div class="version">23.3.0.0</div><div class="versioninfo-bullet">
<br><p>
General:
Expand Down
6 changes: 3 additions & 3 deletions Install/Program Files to Install/bundle/PackageContents.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage SchemaVersion="1.0" AutodeskProduct="Revit" ProductType="Application" Name="IFC Exporter for Revit" AppVersion="23.3.0.0" Description="This application seamlessly replaces the built-in IFC export capabilities of Revit 2023. " Author="Autodesk" Icon=".\Contents\Resources\IFCExporter.png" AppNameSpace="appstore.exchange.autodesk.com" OnlineDocumentation="http://www.autodesk.com" HelpFile=".\Contents\Resources\ADSKIFCExporterHelp.htm" ProductCode="{40527B9C-60B8-407E-BF56-7AAA67F07ACA}" UpgradeCode="{A27E008E-2278-4F84-BB3B-59C605168900}" SupportedLocales="Enu">
<ApplicationPackage SchemaVersion="1.0" AutodeskProduct="Revit" ProductType="Application" Name="IFC Exporter for Revit" AppVersion="23.3.1.0" Description="This application seamlessly replaces the built-in IFC export capabilities of Revit 2023. " Author="Autodesk" Icon=".\Contents\Resources\IFCExporter.png" AppNameSpace="appstore.exchange.autodesk.com" OnlineDocumentation="http://www.autodesk.com" HelpFile=".\Contents\Resources\ADSKIFCExporterHelp.htm" ProductCode="{40527B9C-60B8-407E-BF56-7AAA67F07ACA}" UpgradeCode="{A27E008E-2278-4F84-BB3B-59C605168900}" SupportedLocales="Enu">
<CompanyDetails Name="Autodesk, Inc." Phone=" " Url="http://www.autodesk.com" Email="[email protected]" />
<RuntimeRequirements OS="Win64" Platform="Revit" SeriesMin="R2023" SeriesMax="R2023" />
<Components Description="2023">
<RuntimeRequirements OS="Win64" Platform="Revit" SeriesMin="R2023" SeriesMax="R2023" />
<ComponentEntry AppName="IFC For Revit 2023" Version="23.3.0" ModuleName="./Contents/2023/IFCExporterUIOverride.addin" AppDescription="IFC For Revit 2023" />
<ComponentEntry AppName="IFC For Revit 2023" Version="23.3.0" ModuleName="./Contents/2023/Revit.IFC.addin" AppDescription="IFC For Revit 2023" />
<ComponentEntry AppName="IFC For Revit 2023" Version="23.3.1" ModuleName="./Contents/2023/IFCExporterUIOverride.addin" AppDescription="IFC For Revit 2023" />
<ComponentEntry AppName="IFC For Revit 2023" Version="23.3.1" ModuleName="./Contents/2023/Revit.IFC.addin" AppDescription="IFC For Revit 2023" />
</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-2330-42D2-0000-992E73C12300" Name="Revit IFC 2023" Language="1033" Version="23.3.0.0" Manufacturer="Autodesk" UpgradeCode="1A9C2C21-23B8-42D2-0000-992E73C11B3F">
<Product Id="1A9C2C21-2331-42D2-0000-992E73C12300" Name="Revit IFC 2023" Language="1033" Version="23.3.1.0" Manufacturer="Autodesk" UpgradeCode="1A9C2C21-23B8-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 2023.3.0.0</OutputName>
<OutputName>IFC for Revit 2023.3.1.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 RevitIFC2023.3.0.msi product.wixobj -ext WixUIExtension
light.exe -ext WixUtilExtension -out RevitIFC2023.3.1.msi product.wixobj -ext WixUIExtension

copy RevitIFC2023.3.0.msi %1..\Releasex64
del RevitIFC2023.3.0.msi
copy RevitIFC2023.3.1.msi %1..\Releasex64
del RevitIFC2023.3.1.msi

echo %1..\Releasex64\RevitIFC2023.3.0.msi
echo %1..\Releasex64\RevitIFC2023.3.1.msi
4 changes: 2 additions & 2 deletions Source/IFCExporterUIOverride/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@
// The following information is used in the Open Source version as the release version number.
// The number will show up in the Title bar of the export dialog as well as at the IFC header file
// This number must be manually updated prior to releasing the new version
[assembly: AssemblyVersion("23.3.0.0")]
[assembly: AssemblyFileVersion("23.3.0.0")]
[assembly: AssemblyVersion("23.3.1.0")]
[assembly: AssemblyFileVersion("23.3.1.0")]
#endif
4 changes: 2 additions & 2 deletions Source/Revit.IFC.Common/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("23.3.0.0")]
[assembly: AssemblyFileVersion("23.3.0.0")]
[assembly: AssemblyVersion("23.3.1.0")]
[assembly: AssemblyFileVersion("23.3.1.0")]
#endif


Expand Down
20 changes: 20 additions & 0 deletions Source/Revit.IFC.Common/Utility/IfcSchemaEntityTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,26 @@ static public IfcSchemaEntityTree GetEntityDictFor(IFCVersion ifcFileVersion)
return GetEntityDictFor(schemaFile);
}

/// <summary>
/// Get the IFC Entity Dictionary for the given IFC version specified by the schema file name (without extension)
/// </summary>
/// <param name="schemaFile">the IFC schema file name (without extension). Caller must make sure it is the supported schema file</param>
/// <returns>the tree, or null if the schema file is not found</returns>
static public IfcSchemaEntityTree GetEntityDictFor(string schemaFile)
{
if (m_IFCSchemaDict.ContainsKey(schemaFile))
return m_IFCSchemaDict[schemaFile];

// if not found, process the file and add into the static dictionary
IfcSchemaEntityTree entityTree = PopulateEntityDictFor(schemaFile);
if (entityTree == null)
return null;

m_IFCSchemaDict.Add(schemaFile, entityTree);
m_IFCEntityPredefTypeDict.Add(schemaFile, entityTree.PredefinedTypeEnumDict);
return entityTree;
}

/// <summary>
/// Get the IFC Entity Dictionary for the given IFC version specified by the schema file name (without extension)
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Source/Revit.IFC.Export/Exporter/HostedSweepExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static void Export(ExporterIFC exporterIFC, HostedSweep hostedSweep, Geom
if (catId == new ElementId(BuiltInCategory.OST_Gutter))
ExportGutter(exporterIFC, hostedSweep, geometryElement, productWrapper);
else
ProxyElementExporter.Export(exporterIFC, hostedSweep, geometryElement, productWrapper);
GenericElementExporter.ExportElement(exporterIFC, hostedSweep, geometryElement, productWrapper);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Source/Revit.IFC.Export/Exporter/WallSweepExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static void Export(ExporterIFC exporterIFC, WallSweep wallSweep, Geometry
if (wallSweepInfo.WallSweepType == WallSweepType.Reveal)
return;

if (!ProxyElementExporter.Export(exporterIFC, wallSweep, geometryElement, productWrapper))
if (!GenericElementExporter.ExportElement(exporterIFC, wallSweep, geometryElement, productWrapper))
return;

HostObjectExporter.ExportHostObjectMaterials(exporterIFC, wallSweep, productWrapper.GetAnElement(),
Expand Down
4 changes: 2 additions & 2 deletions Source/Revit.IFC.Export/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("23.3.0.0")]
[assembly: AssemblyFileVersion("23.3.0.0")]
[assembly: AssemblyVersion("23.3.1.0")]
[assembly: AssemblyFileVersion("23.3.1.0")]

#endif

Expand Down
55 changes: 44 additions & 11 deletions Source/Revit.IFC.Export/Utility/OpeningUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -485,24 +485,19 @@ static public IFCAnyHandle CreateOpening(ExporterIFC exporterIFC, IFCAnyHandle h
lcs = GeometryUtil.CreateTransformFromPlane(curveLoops[0].GetPlane());
}

ElementId catId = CategoryUtil.GetSafeCategoryId(insertElement);

if (extrusionData.ScaledExtrusionLength < MathUtil.Eps())
{
double thickness = 0.0;
if (hostElement is Floor)
ParameterUtil.GetDoubleValueFromElement(hostElement, BuiltInParameter.FLOOR_ATTR_THICKNESS_PARAM, out thickness);
else if (hostElement is RoofBase)
ParameterUtil.GetDoubleValueFromElement(hostElement, BuiltInParameter.ROOF_ATTR_THICKNESS_PARAM, out thickness);
else if (hostElement is Ceiling)
ParameterUtil.GetDoubleValueFromElement(hostElement, BuiltInParameter.CEILING_THICKNESS, out thickness);
double extrusionLength = 0.0;
if (hostElement is Floor || hostElement is RoofBase || hostElement is Ceiling)
extrusionLength = CalculateOpeningExtrusionInFloorRoofOrCeiling(hostElement, extrusionData);

if (thickness < MathUtil.Eps())
if (extrusionLength < MathUtil.Eps())
return null;

extrusionData.ScaledExtrusionLength = UnitUtil.ScaleLength(thickness);
extrusionData.ScaledExtrusionLength = UnitUtil.ScaleLength(extrusionLength);
}

ElementId catId = CategoryUtil.GetSafeCategoryId(insertElement);
IFCAnyHandle openingHnd = null;
IFCAnyHandle openingProdRepHnd = RepresentationUtil.CreateExtrudedProductDefShape(exporterIFC, insertElement, catId,
curveLoops, lcs, extrusionData.ExtrusionDirection, extrusionData.ScaledExtrusionLength);
Expand Down Expand Up @@ -596,5 +591,43 @@ static bool GetOpeningDirections(Element hostElem, out XYZ perpToWall, out XYZ w

return isLinearWall;
}

/// <summary>
/// Calculates extrusion length for openings in floor roof or ceiling based on the element thickness for not sloped elements,
/// and based on bounding box for sloped. Also defines the extrusion direction for sloped elements.
/// </summary>
/// <param name="hostElement">The host element.</param>
/// <param name="extrusionData">The opening extrusion data</param>
/// <returns>The extrusion length</returns>
private static double CalculateOpeningExtrusionInFloorRoofOrCeiling(Element hostElement, IFCExtrusionData extrusionData)
{
double extrusionLength = 0.0;
//Use the element thickness for not sloped elements, if the host element is sloped, the extrusions of the resulting opening will not intersect the host element.
//To handle such cases using bounding box height instead of thickness.
//
double slopeValue = 0.0;
ParameterUtil.GetDoubleValueFromElement(hostElement, BuiltInParameter.ROOF_SLOPE, out slopeValue);
if (MathUtil.IsAlmostZero(slopeValue))
{
if (hostElement is Floor)
ParameterUtil.GetDoubleValueFromElement(hostElement, BuiltInParameter.FLOOR_ATTR_THICKNESS_PARAM, out extrusionLength);
else if (hostElement is RoofBase)
ParameterUtil.GetDoubleValueFromElement(hostElement, BuiltInParameter.ROOF_ATTR_THICKNESS_PARAM, out extrusionLength);
else if (hostElement is Ceiling)
ParameterUtil.GetDoubleValueFromElement(hostElement, BuiltInParameter.CEILING_THICKNESS, out extrusionLength);
}
else
{
BoundingBoxXYZ hostElementBoundingBox = hostElement.get_BoundingBox(hostElement.Document.GetElement(hostElement.OwnerViewId) as View);
extrusionLength = hostElementBoundingBox.Max.Z - hostElementBoundingBox.Min.Z;

//Need to recheck the ExtrusionDirection.
//If slope is positive value the host it will be above.
//
extrusionData.ExtrusionDirection = (slopeValue > 0) ? XYZ.BasisZ : -XYZ.BasisZ;
}

return extrusionLength;
}
}
}
4 changes: 2 additions & 2 deletions Source/Revit.IFC.Import.Core/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
[assembly: AssemblyDescription("Revit.IFC.Import.Core")]
[assembly: AssemblyCompany("Autodesk")]
[assembly: AssemblyCopyright("@2012-2023 Autodesk, Inc. All rights reserved.")]
[assembly: AssemblyVersion("23.3.0.0")]
[assembly: AssemblyFileVersion("23.3.0.0")]
[assembly: AssemblyVersion("23.3.1.0")]
[assembly: AssemblyFileVersion("23.3.1.0")]

// Version information can now be found in Source\Foundation\RevitENU\Version.cs
//
4 changes: 2 additions & 2 deletions Source/Revit.IFC.Import/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("23.3.0.0")]
[assembly: AssemblyFileVersion("23.3.0.0")]
[assembly: AssemblyVersion("23.3.1.0")]
[assembly: AssemblyFileVersion("23.3.1.0")]
#endif

#region Using directives
Expand Down

0 comments on commit b647e72

Please sign in to comment.