Skip to content

Commit

Permalink
Calling Create method rather than constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
IsakNaslundBh authored and Fraser Greenroyd committed Jan 14, 2022
1 parent ca56ef2 commit 5ecaac7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Revit_Core_Engine/Query/MaterialTakeoff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static RevitMaterialTakeOff MaterialTakeoff(this Element element, RevitSe
}

if (takeoff.Count != 0)
return new RevitMaterialTakeOff(totalVolume, new oM.Physical.Materials.MaterialComposition(takeoff.Keys, takeoff.Values.Select(x => x / totalVolume)));
return new RevitMaterialTakeOff(totalVolume, BH.Engine.Matter.Create.MaterialComposition(takeoff.Keys, takeoff.Values.Select(x => x / totalVolume)));
else
return null;
}
Expand Down
7 changes: 5 additions & 2 deletions Revit_Core_Engine/Revit_Core_Engine.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -237,6 +237,9 @@
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Matter_Engine">
<HintPath>..\..\..\..\..\..\..\ProgramData\BHoM\Assemblies\Matter_Engine.dll</HintPath>
</Reference>
<Reference Include="MEP_Engine">
<HintPath>C:\ProgramData\BHoM\Assemblies\MEP_Engine.dll</HintPath>
<Private>False</Private>
Expand Down Expand Up @@ -638,4 +641,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

0 comments on commit 5ecaac7

Please sign in to comment.