Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling Create method rather than constructor for MaterialComposition #1161

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
9 changes: 7 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,11 @@
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Matter_Engine">
<HintPath>C:\ProgramData\BHoM\Assemblies\Matter_Engine.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="MEP_Engine">
<HintPath>C:\ProgramData\BHoM\Assemblies\MEP_Engine.dll</HintPath>
<Private>False</Private>
Expand Down Expand Up @@ -638,4 +643,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>