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
@@ -112,7 +112,7 @@ namespace Revit.SDK.Samples.NewRebar.CS
{
if (string.IsNullOrEmpty(ParamName) || string.IsNullOrEmpty(ParamValue))
{
TaskDialog.Show("Revit", "Parameter Name and Value should not be null.");
Autodesk.Revit.UI.TaskDialog.Show("Revit", "Parameter Name and Value should not be null.");
return;
}
@@ -124,7 +124,7 @@ namespace Revit.SDK.Samples.NewRebar.CS
}
catch
{
TaskDialog.Show("Revit", "Input value - " + ParamValue + " - should be double.");
Autodesk.Revit.UI.TaskDialog.Show("Revit", "Input value - " + ParamValue + " - should be double.");
return;
}
}
@@ -134,7 +134,7 @@ namespace Revit.SDK.Samples.NewRebar.CS
Regex regex = new Regex("^[a-zA-Z]\\w*$");
if (!regex.IsMatch(ParamName))
{
TaskDialog.Show("Revit", "Parameter name should be started with letter \r\n And just contains letters, numbers and underlines.");
Autodesk.Revit.UI.TaskDialog.Show("Revit", "Parameter name should be started with letter \r\n And just contains letters, numbers and underlines.");
paramNameTextBox.Focus();
return;
}
@@ -144,7 +144,7 @@ namespace Revit.SDK.Samples.NewRebar.CS
{
if (param.Name.Equals(ParamName))
{
TaskDialog.Show("Revit", "The name is already exist, please input again.");
Autodesk.Revit.UI.TaskDialog.Show("Revit", "The name is already exist, please input again.");
paramNameTextBox.Focus();
return;
}
+7 -2
View File
@@ -35,9 +35,14 @@ namespace Revit.SDK.Samples.NewRebar.CS
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
if (disposing)
{
components.Dispose();
if (components != null)
components.Dispose();
if (m_barTypesBinding != null)
m_barTypesBinding.Dispose();
if (m_shapesBinding != null)
m_shapesBinding.Dispose();
}
base.Dispose(disposing);
}
@@ -156,7 +156,7 @@ namespace Revit.SDK.Samples.NewRebar.CS
// Make sure the name is not null or empty.
if (string.IsNullOrEmpty(nameTextBox.Text.Trim()))
{
TaskDialog.Show("Revit", "Please give a name to create a rebar shape.");
Autodesk.Revit.UI.TaskDialog.Show("Revit", "Please give a name to create a rebar shape.");
return;
}
@@ -165,7 +165,7 @@ namespace Revit.SDK.Samples.NewRebar.CS
Regex regex = new Regex("^[a-zA-Z]\\w+$");
if (!regex.IsMatch(nameTextBox.Text.Trim()))
{
TaskDialog.Show("Revit", "Please input the name starting with letter and just containing letters, numbers and underlines. String is " + nameTextBox.Text.ToString());
Autodesk.Revit.UI.TaskDialog.Show("Revit", "Please input the name starting with letter and just containing letters, numbers and underlines. String is " + nameTextBox.Text.ToString());
nameTextBox.Focus();
return;
}
@@ -199,7 +199,7 @@ namespace Revit.SDK.Samples.NewRebar.CS
}
else
{
TaskDialog.Show("Revit", "Please input a valid positive integer as segments count.");
Autodesk.Revit.UI.TaskDialog.Show("Revit", "Please input a valid positive integer as segments count.");
return;
}
}
+7 -2
View File
@@ -35,9 +35,14 @@ namespace Revit.SDK.Samples.NewRebar.CS
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
if (disposing)
{
components.Dispose();
if (components != null)
components.Dispose();
if (m_parametersListBoxBinding != null)
m_parametersListBoxBinding.Dispose();
if (m_constraintsListBoxBinding != null)
m_constraintsListBoxBinding.Dispose();
}
base.Dispose(disposing);
}
@@ -258,7 +258,7 @@ namespace Revit.SDK.Samples.NewRebar.CS
}
catch (Exception ex)
{
TaskDialog.Show("Revit", "Rebar shape creation failed:" + ex.ToString());
Autodesk.Revit.UI.TaskDialog.Show("Revit", "Rebar shape creation failed:" + ex.ToString());
return;
}
+3 -123
View File
@@ -1,136 +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>{3F5F3438-EA42-4340-9DEA-1D82A80BDE94}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Revit.SDK.Samples.NewRebar.CS</RootNamespace>
<AssemblyName>NewRebar</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<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.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Forms\AddConstraintForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\AddConstraintForm.Designer.cs">
<DependentUpon>AddConstraintForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\AddParameterForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\AddParameterForm.Designer.cs">
<DependentUpon>AddParameterForm.cs</DependentUpon>
</Compile>
<Compile Include="Geom\GeometrySupport.cs" />
<Compile Include="Geom\GeomUtil.cs" />
<Compile Include="RebarCreator.cs" />
<Compile Include="RebarShapeDef\RebarShapeDefByArc.cs" />
<Compile Include="Command.cs" />
<Compile Include="Constraints\ConstraintOnArcShape.cs" />
<Compile Include="Constraints\ConstraintOnSegmentShape.cs" />
<Compile Include="Forms\NewRebarForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\NewRebarForm.Designer.cs">
<DependentUpon>NewRebarForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\NewRebarShapeForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\NewRebarShapeForm.Designer.cs">
<DependentUpon>NewRebarShapeForm.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Constraints\ConstraintOnRebarShape.cs" />
<Compile Include="RebarShapeDef\RebarShapeDef.cs" />
<Compile Include="RebarShapeDef\RebarShapeDefBySegment.cs" />
<Compile Include="Parameters\RebarShapeParameter.cs" />
<Compile Include="Parameters\RebarShapeParameterDouble.cs" />
<Compile Include="Parameters\RebarShapeParameterFormula.cs" />
<Compile Include="TypeConverter\TypeConverterRebarShapeParameter.cs" />
<Compile Include="TypeConverter\TypeConverterSegmentId.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Forms\AddConstraintForm.resx">
<SubType>Designer</SubType>
<DependentUpon>AddConstraintForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\AddParameterForm.resx">
<SubType>Designer</SubType>
<DependentUpon>AddParameterForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\NewRebarForm.resx">
<SubType>Designer</SubType>
<DependentUpon>NewRebarForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\NewRebarShapeForm.resx">
<SubType>Designer</SubType>
<DependentUpon>NewRebarShapeForm.cs</DependentUpon>
</EmbeddedResource>
</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>
@@ -55,3 +55,5 @@ using System.Runtime.InteropServices;
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")]