updated to Revit 2023 SDK

This commit is contained in:
Jeremy Tammik
2022-04-07 09:12:58 +02:00
parent e3434c5200
commit ab02648986
342 changed files with 6496 additions and 3140 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ namespace Revit.SDK.Samples.MultiplanarRebar.CS
// •Hosting Rebar.
// •Autojoining to columns and walls.
// •Manual joining to other concrete elements.
return (corbel.Category.Id.IntegerValue == (int)BuiltInCategory.OST_StructConnections &&
return (corbel.Category.BuiltInCategory == BuiltInCategory.OST_StructConnections &&
(corbel.StructuralMaterialType == StructuralMaterialType.Concrete ||
corbel.StructuralMaterialType == StructuralMaterialType.PrecastConcrete));
}
@@ -426,7 +426,6 @@ namespace Revit.SDK.Samples.MultiplanarRebar.CS
bars.GetShapeDrivenAccessor().SetLayoutAsFixedNumber(options.TopBarCount + 2,
m_extrusionLine.Length - 2 * offset, true, false, false);
ShowRebar3d(bars);
}
/// <summary>
@@ -466,7 +465,6 @@ namespace Revit.SDK.Samples.MultiplanarRebar.CS
newRebar.GetShapeDrivenAccessor().ScaleToBoxFor3D(origin + extruDir * (m_extrusionLine.Length - offset),
vx, vy, m_extrusionLine.Length - 2 * offset);
ShowRebar3d(newRebar);
}
/// <summary>
@@ -509,7 +507,6 @@ namespace Revit.SDK.Samples.MultiplanarRebar.CS
stirrupBars.GetShapeDrivenAccessor().SetLayoutAsFixedNumber(options.StirrupBarCount + 1, profileCopy.Top.Length, false, false, true);
stirrupBars.GetShapeDrivenAccessor().ScaleToBox(origin, xAxis * xLength, yAxis * yLength);
ShowRebar3d(stirrupBars);
double space = profileCopy.Top.Length / options.StirrupBarCount;
double step = space * m_profile.Vertical.Length / (m_profile.Bottom.Length - m_profile.Top.Length);
@@ -527,7 +524,6 @@ namespace Revit.SDK.Samples.MultiplanarRebar.CS
options.StirrupBarType, m_corbel, origin, xAxis, yAxis);
stirrupBars2.GetShapeDrivenAccessor().ScaleToBox(origin, xAxis * xLength, yAxis * (yLength - i * step));
ShowRebar3d(stirrupBars2);
}
}
@@ -562,24 +558,6 @@ namespace Revit.SDK.Samples.MultiplanarRebar.CS
RebarHookOrientation.Left, RebarHookOrientation.Left, true, true);
bars.GetShapeDrivenAccessor().SetLayoutAsFixedNumber(2, m_extrusionLine.Length - 2 * offset, true, true, true);
ShowRebar3d(bars);
}
/// <summary>
/// Show the given rebar as solid in 3d view.
/// </summary>
/// <param name="rebar">Rebar to show in 3d view as solid</param>
private void ShowRebar3d(Rebar rebar)
{
var filter = new FilteredElementCollector(rebar.Document)
.OfClass(typeof(View3D));
foreach (View3D view in filter)
{
rebar.IsUnobscuredInView(view);
rebar.SetSolidInView(view, true);
}
}
}
}
@@ -23,7 +23,6 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>
</DocumentationFile>
<CodeAnalysisRuleSet />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -35,7 +34,6 @@
<DocumentationFile>
</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CodeAnalysisRuleSet />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
@@ -44,8 +42,7 @@
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>
</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
@@ -55,8 +52,7 @@
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>
</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>