Skip to content

Commit 93946a2

Browse files
author
Wawan Solihin
committed
Minor update to 20.2.1 with fix for issue that prevents exporter to work for 2020.0 and 2020.0 due to a new API that was only introduced in 2020.2,
fix issue of data type mismatch in the parameter expression
1 parent a1cff9c commit 93946a2

File tree

13 files changed

+56
-24
lines changed

13 files changed

+56
-24
lines changed

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

+17
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,23 @@ <h3>Support Information</h3>
208208
<h2 id="VersionHistory" name="VersionHistory">Version History</h2>
209209

210210
<div class="versionset">
211+
<div class="version">20.2.1.0</div><div class="versioninfo-bullet">
212+
<br><p>
213+
General:
214+
<ul>
215+
<li>This is a minor update to release 20.2.0 mainly provide a fix due to a new API that is only available in Revit 2020.2 release, but not in 2020.1 and 2020.0
216+
</ul>
217+
<br>
218+
<p>
219+
Bugfix:
220+
<ul>
221+
<li>Avoid 2020.2 API in the IFC exporter to allow 2020.0 amd 2020.1 to be able to use the exporter
222+
<li>Fix issue that mismatches the double value in the parameter expression
223+
</ul>
224+
225+
</div>
226+
<br>
227+
211228
<div class="version">20.2.0.0</div><div class="versioninfo-bullet">
212229

213230
<br><p>

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="R2020" SeriesMax="R2020" />
55
<Components Description="2020">
66
<RuntimeRequirements OS="Win64" Platform="Revit" SeriesMin="R2020" SeriesMax="R2020" />
7-
<ComponentEntry AppName="IFC For Revit 2020" Version="20.2.0" ModuleName="./Contents/2020/IFCExporterUIOverride.addin" AppDescription="IFC For Revit 2020" />
8-
<ComponentEntry AppName="IFC For Revit 2020" Version="20.2.0" ModuleName="./Contents/2020/Revit.IFC.addin" AppDescription="IFC For Revit 2020" />
7+
<ComponentEntry AppName="IFC For Revit 2020" Version="20.2.1" ModuleName="./Contents/2020/IFCExporterUIOverride.addin" AppDescription="IFC For Revit 2020" />
8+
<ComponentEntry AppName="IFC For Revit 2020" Version="20.2.1" ModuleName="./Contents/2020/Revit.IFC.addin" AppDescription="IFC For Revit 2020" />
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="A553F44D-80A7-45A6-BF2D-255CF0D0EC5A" Name="Revit IFC 2020" Language="1033" Version="20.2.0.0" Manufacturer="Autodesk" UpgradeCode="C14A1765-2F98-4147-85E0-B0DCDB73A5BF">
5+
<Product Id="EA2F8723-7EEC-4B25-A46D-7490CD78FAC9" Name="Revit IFC 2020" Language="1033" Version="20.2.1.0" Manufacturer="Autodesk" UpgradeCode="C14A1765-2F98-4147-85E0-B0DCDB73A5BF">
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 2020 version 20.2.0.0</OutputName>
9+
<OutputName>IFC for Revit 2020 version 20.2.1.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 RevitIFC20.2.0.0.msi product.wixobj -ext WixUIExtension
14+
light.exe -ext WixUtilExtension -out RevitIFC20.2.1.0.msi product.wixobj -ext WixUIExtension
1515

16-
copy RevitIFC20.2.0.0.msi %1..\Releasex64
17-
del RevitIFC20.2.0.0.msi
16+
copy RevitIFC20.2.1.0.msi %1..\Releasex64
17+
del RevitIFC20.2.1.0.msi
1818

19-
echo %1..\Releasex64\RevitIFC20.2.0.0.msi
19+
echo %1..\Releasex64\RevitIFC20.2.1.0.msi

Source/IFCExporterUIOverride/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@
6666
// The following information is used in the Open Source version as the release version number.
6767
// The number will show up in the Title bar of the export dialog as well as at the IFC header file
6868
// This number must be manually updated prior to releasing the new version
69-
[assembly: AssemblyVersion("20.2.0.0")]
70-
[assembly: AssemblyFileVersion("20.2.0.0")]
69+
[assembly: AssemblyVersion("20.2.1.0")]
70+
[assembly: AssemblyFileVersion("20.2.1.0")]
7171
#endif

Source/Revit.IFC.Common/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
[assembly: AssemblyCopyright("© 2012-2020 Autodesk, Inc.All rights reserved.")]
1313
[assembly: AssemblyTrademark("")]
1414
[assembly: AssemblyCulture("")]
15-
[assembly: AssemblyVersion("20.2.0.0")]
16-
[assembly: AssemblyFileVersion("20.2.0.0")]
15+
[assembly: AssemblyVersion("20.2.1.0")]
16+
[assembly: AssemblyFileVersion("20.2.1.0")]
1717
#endif
1818

1919

Source/Revit.IFC.Export/Exporter/Exporter.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2615,7 +2615,8 @@ private void CreateProject(ExporterIFC exporterIFC, Document doc, IFCAnyHandle a
26152615
}
26162616

26172617
XYZ basePointPosition = null;
2618-
BasePoint basePoint = BasePoint.GetSurveyPoint(doc);
2618+
//BasePoint basePoint = BasePoint.GetSurveyPoint(doc);
2619+
BasePoint basePoint = new FilteredElementCollector(doc).WherePasses(new ElementCategoryFilter(BuiltInCategory.OST_SharedBasePoint)).First() as BasePoint;
26192620
if (basePoint != null)
26202621
basePointPosition = basePoint.Position;
26212622

Source/Revit.IFC.Export/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

17-
[assembly: AssemblyVersion("20.2.0.0")]
18-
[assembly: AssemblyFileVersion("20.2.0.0")]
17+
[assembly: AssemblyVersion("20.2.1.0")]
18+
[assembly: AssemblyFileVersion("20.2.1.0")]
1919

2020
#endif
2121

Source/Revit.IFC.Import/Data/IFCImportFile.cs

+19-4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
using ICSharpCode.SharpZipLib.Core;
3535
using System.Xml;
3636
using IFCImportOptions = Revit.IFC.Import.Utility.IFCImportOptions;
37+
using System.Reflection;
3738

3839
namespace Revit.IFC.Import.Data
3940
{
@@ -1007,6 +1008,20 @@ static IFCFile CreateIFCFileFromIFCZIP(string path, out IFCSchemaVersion schemaV
10071008
}
10081009
}
10091010

1011+
private static string LocateSchemaFile(string schemaFileName)
1012+
{
1013+
string filePath = null;
1014+
#if IFC_OPENSOURCE
1015+
// Find the alternate schema file from the open source install folder
1016+
filePath = Path.Combine(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location), schemaFileName);
1017+
if (!File.Exists(filePath))
1018+
#endif
1019+
{
1020+
filePath = Path.Combine(DirectoryUtil.RevitProgramPath, "EDM", schemaFileName);
1021+
}
1022+
return filePath;
1023+
}
1024+
10101025
/// <summary>
10111026
/// Gets IFCFileModelOptions from schema name.
10121027
/// </summary>
@@ -1025,22 +1040,22 @@ static IFCFileModelOptions GetIFCFileModelOptions(string schemaName, out IFCSche
10251040
}
10261041
else if (string.Compare(schemaName, "IFC2X3", true) == 0)
10271042
{
1028-
modelOptions.SchemaFile = Path.Combine(DirectoryUtil.RevitProgramPath, "EDM\\IFC2X3_TC1.exp");
1043+
modelOptions.SchemaFile = LocateSchemaFile("IFC2X3_TC1.exp");
10291044
schemaVersion = IFCSchemaVersion.IFC2x3;
10301045
}
10311046
else if (string.Compare(schemaName, "IFC2X_FINAL", true) == 0)
10321047
{
1033-
modelOptions.SchemaFile = Path.Combine(DirectoryUtil.RevitProgramPath, "EDM\\IFC2X_PROXY.exp");
1048+
modelOptions.SchemaFile = LocateSchemaFile("IFC2X_PROXY.exp");
10341049
schemaVersion = IFCSchemaVersion.IFC2x;
10351050
}
10361051
else if (string.Compare(schemaName, "IFC2X2_FINAL", true) == 0)
10371052
{
1038-
modelOptions.SchemaFile = Path.Combine(DirectoryUtil.RevitProgramPath, "EDM\\IFC2X2_ADD1.exp");
1053+
modelOptions.SchemaFile = LocateSchemaFile("IFC2X2_ADD1.exp");
10391054
schemaVersion = IFCSchemaVersion.IFC2x2;
10401055
}
10411056
else if (string.Compare(schemaName, "IFC4", true) == 0)
10421057
{
1043-
modelOptions.SchemaFile = Path.Combine(DirectoryUtil.RevitProgramPath, "EDM\\IFC4.exp");
1058+
modelOptions.SchemaFile = LocateSchemaFile("IFC4.exp");
10441059
schemaVersion = IFCSchemaVersion.IFC4;
10451060
}
10461061
else

Source/Revit.IFC.Import/Data/IFCPropertySet.cs

-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ static IDictionary<UnitType, ParameterType> UnitToParameterType
154154
m_UnitToParameterType[UnitType.UT_Mass] = ParameterType.Mass;
155155
m_UnitToParameterType[UnitType.UT_MassPerUnitArea] = ParameterType.MassPerUnitLength;
156156
m_UnitToParameterType[UnitType.UT_Moment_of_Inertia] = ParameterType.MomentOfInertia;
157-
m_UnitToParameterType[UnitType.UT_Area] = ParameterType.Area;
158157
m_UnitToParameterType[UnitType.UT_Period] = ParameterType.Period;
159158
m_UnitToParameterType[UnitType.UT_Pulsation] = ParameterType.Pulsation;
160159
m_UnitToParameterType[UnitType.UT_Reinforcement_Area] = ParameterType.ReinforcementArea;

Source/Revit.IFC.Import/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

17-
[assembly: AssemblyVersion("20.2.0.0")]
18-
[assembly: AssemblyFileVersion("20.2.0.0")]
17+
[assembly: AssemblyVersion("20.2.1.0")]
18+
[assembly: AssemblyFileVersion("20.2.1.0")]
1919
#endif
2020

2121
#region Using directives

Source/RevitIFCTools/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
// You can specify all the values or you can default the Build and Revision Numbers
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("20.2.0.0")]
55-
[assembly: AssemblyFileVersion("20.2.0.0")]
54+
[assembly: AssemblyVersion("20.2.1.0")]
55+
[assembly: AssemblyFileVersion("20.2.1.0")]

0 commit comments

Comments
 (0)