integrate Revit 2025 SDK

This commit is contained in:
Jeremy Tammik
2024-04-11 13:47:20 +02:00
parent e786953544
commit f414362f2b
889 changed files with 26676 additions and 26865 deletions
@@ -1,5 +1,5 @@
//
// (C) Copyright 2003-2019 by Autodesk, Inc.
// (C) Copyright 2003-2023 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
@@ -28,6 +28,8 @@ using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using TaskDialog = Autodesk.Revit.UI.TaskDialog;
namespace Revit.SDK.Samples.PanelEdgeLengthAngle.CS
{
/// <summary>
@@ -81,7 +83,7 @@ namespace Revit.SDK.Samples.PanelEdgeLengthAngle.CS
// step 3: compute the length and angle and set them to the parameters
InstParameters instParams = GetParams(inst);
EdgeArray edges = GetEdges(inst);
SetParams(edges, instParams);
SetParams(m_doc, edges, instParams);
}
}
return Autodesk.Revit.UI.Result.Succeeded;
@@ -166,9 +168,10 @@ namespace Revit.SDK.Samples.PanelEdgeLengthAngle.CS
/// <summary>
/// Compute the length and angle data of the edges, then update the parameters with these values
/// </summary>
/// <param name="document">The active document.</param>
/// <param name="edge_ar">The edges of the curtain panel</param>
/// <param name="instParams">The parameters which records the length and angle data</param>
private void SetParams(EdgeArray edge_ar, InstParameters instParams)
private void SetParams(Document document, EdgeArray edge_ar, InstParameters instParams)
{
double length4 = 0d;
double angle3 = 0d;
@@ -194,14 +197,21 @@ namespace Revit.SDK.Samples.PanelEdgeLengthAngle.CS
angle4 = AngleBetweenEdges(edge4, edge1);
}
instParams["Length1"].Set(length1);
instParams["Length2"].Set(length2);
instParams["Length3"].Set(length3);
instParams["Length4"].Set(length4);
instParams["Angle1"].Set(angle1);
instParams["Angle2"].Set(angle2);
instParams["Angle3"].Set(angle3);
instParams["Angle4"].Set(angle4);
using (Transaction transaction = new Transaction(document, "Update family instance parameters"))
{
transaction.Start();
instParams["Length1"].Set(length1);
instParams["Length2"].Set(length2);
instParams["Length3"].Set(length3);
instParams["Length4"].Set(length4);
instParams["Angle1"].Set(angle1);
instParams["Angle2"].Set(angle2);
instParams["Angle3"].Set(angle3);
instParams["Angle4"].Set(angle4);
transaction.Commit();
}
}
/// <summary>
@@ -1,78 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5DB5F654-5829-4B0E-BB6B-E3895625E49A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Revit.SDK.Samples.PanelEdgeLengthAngle.CS</RootNamespace>
<AssemblyName>PanelEdgeLengthAngle</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<Import Project="$(SolutionDir)VSProps\SDKSamples.Sdk.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="Command.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(SolutionDir)VSProps\SDKSamples.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<Import Project="$(SolutionDir)VSProps\SDKSamples.Sdk.targets" />
<PropertyGroup>
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py"
if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Autodesk, Inc.")]
[assembly: AssemblyProduct("PanelEdgeLengthAngle")]
[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")]
[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]