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
@@ -83,8 +83,7 @@ Public Class RvtCmd_LibraryPaths ' Library Paths
Loop
' show it.
MsgBox(str)
Autodesk.Revit.UI.TaskDialog.Show("Revit", str)
' do we have lib path with this key?
If (paths.ContainsKey(key)) Then
@@ -106,9 +105,9 @@ Public Class RvtCmd_LibraryPaths ' Library Paths
Do While (iter.MoveNext())
str += iter.Current.Key + " = " + iter.Current.Value + vbCr
Loop
MsgBox(str + vbCr + comment)
Autodesk.Revit.UI.TaskDialog.Show("Revit", str + vbCr + comment)
Return Autodesk.Revit.UI.Result.Succeeded
Return Autodesk.Revit.UI.Result.Succeeded
End Function
@@ -83,14 +83,14 @@ Public Class RvtCmd_LoadFamilySymbol
Dim loadSuccess As Boolean = revitDoc.LoadFamilySymbol(fileName, symName)
transaction.Commit()
If (loadSuccess) Then
MsgBox("Family " & fileName & ", Type " & symName & " successfully loaded!")
Autodesk.Revit.UI.TaskDialog.Show("Revit", "Family " & fileName & ", Type " & symName & " successfully loaded!")
Return Autodesk.Revit.UI.Result.Succeeded
End If
Catch ex As Exception
transaction.RollBack()
End Try
MsgBox("ERROR in loading Family " & fileName & ", Type " & symName)
Autodesk.Revit.UI.TaskDialog.Show("Revit", "ERROR in loading Family " & fileName & ", Type " & symName)
Return Autodesk.Revit.UI.Result.Failed
End Function
@@ -143,14 +143,14 @@ Public Class RvtCmd_LoadFamily
Dim loadSuccess As Boolean = revitDoc.LoadFamily(fullPath)
transaction.Commit()
If (loadSuccess) Then
MsgBox("Loaded a family ok.")
Autodesk.Revit.UI.TaskDialog.Show("Revit", "Loaded a family ok.")
Return Autodesk.Revit.UI.Result.Succeeded
End If
Catch ex As Exception
transaction.RollBack()
End Try
MsgBox("Failed to load a family.")
Autodesk.Revit.UI.TaskDialog.Show("Revit", "Failed to load a family.")
'Return Autodesk.Revit.UI.Result.Failed ' bug in Revit 8.0
Return Autodesk.Revit.UI.Result.Succeeded
@@ -192,7 +192,7 @@ Public Class RvtCmd_LoadFamily
' search this directory
Dim fname As String
For Each fname In Directory.GetFiles(path, fileName)
MsgBox("I found the file in: " + fname)
Autodesk.Revit.UI.TaskDialog.Show("Revit", "I found the file in: " + fname)
Return path
Next
@@ -1,147 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<Project Sdk="">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{73C4CC97-C4BE-453E-92CA-CA3D3F2F5285}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>RevitCommands</AssemblyName>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<OptionCompare>Binary</OptionCompare>
<OptionExplicit>On</OptionExplicit>
<OptionStrict>Off</OptionStrict>
<RootNamespace>Revit.SDK.Samples.RevitCommands.VB.NET</RootNamespace>
<StartupObject>RevitCommands.%28なし%29</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
<MyType>Windows</MyType>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\</OutputPath>
<DocumentationFile>
</DocumentationFile>
<BaseAddress>285212672</BaseAddress>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>
</DefineConstants>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<DebugSymbols>true</DebugSymbols>
<Optimize>false</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>1</WarningLevel>
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
<DebugType>full</DebugType>
<!--Added [false] deterministic property to prevent CS8357 when AssemblyInfo.cs contains wildcard in version string-->
<Deterministic>false</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\</OutputPath>
<DocumentationFile>
</DocumentationFile>
<BaseAddress>285212672</BaseAddress>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>
</DefineConstants>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<DebugSymbols>false</DebugSymbols>
<Optimize>true</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>1</WarningLevel>
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
<DebugType>none</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<BaseAddress>285212672</BaseAddress>
<WarningLevel>1</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Release\</OutputPath>
<BaseAddress>285212672</BaseAddress>
<Optimize>true</Optimize>
<WarningLevel>1</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
</Reference>
<Reference Include="System.Data">
<Name>System.Data</Name>
</Reference>
<Reference Include="System.Xml">
<Name>System.XML</Name>
</Reference>
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="LibraryPath.vb" />
<Compile Include="LoadFamily.vb" />
<Compile Include="RvtUtils.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="Selection.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="ShowElementData.vb">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Folder Include="My Project\" />
</ItemGroup>
<Import Project="$(SolutionDir)VSProps\SDKSamples.VB.targets" />
<Import Project="$(SolutionDir)VSProps\SDKSamples.VB.Sdk.props" />
<Import Project="$(SolutionDir)VSProps\SDKSamples.VB.Sdk.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py"
if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
</PropertyGroup>
+6 -6
View File
@@ -55,7 +55,7 @@ Public Class RvtUtils
str = str + ParameterSetToString(elem.Document, params)
' show it
MsgBox(str)
Autodesk.Revit.UI.TaskDialog.Show("Revit", str)
End Sub
@@ -86,7 +86,7 @@ Public Class RvtUtils
End If
' show it.
MsgBox(str)
Autodesk.Revit.UI.TaskDialog.Show("Revit", str)
End Sub
@@ -176,13 +176,13 @@ Public Class RvtUtils
' does the element have geometry data?
Dim geomElem As Autodesk.Revit.DB.GeometryElement = elem.Geometry(opt)
If geomElem Is Nothing Then
MsgBox(str & "no data")
Autodesk.Revit.UI.TaskDialog.Show("Revit", str & "no data")
Return
End If
str = GeometryElementToString(geomElem)
MsgBox(str)
Autodesk.Revit.UI.TaskDialog.Show("Revit", str)
End Sub
@@ -343,7 +343,7 @@ Public Class RvtUtils
' do we have a location data?
Dim loc As Location = elem.Location
If (loc Is Nothing) Then
MsgBox(str & "no data")
Autodesk.Revit.UI.TaskDialog.Show("Revit", str & "no data")
Return
End If
@@ -369,7 +369,7 @@ Public Class RvtUtils
End If
' show it.
MsgBox(str)
Autodesk.Revit.UI.TaskDialog.Show("Revit", str)
End Sub
@@ -76,10 +76,10 @@ Public Class RvtCmd_Selection
' how many did you get?
'
If selSet.IsEmpty Then
MsgBox("Nothing selected - exiting command!")
Autodesk.Revit.UI.TaskDialog.Show("Revit", "Nothing selected - exiting command!")
Return Autodesk.Revit.UI.Result.Failed
End If
MsgBox("The number of selected elements = " & selSet.Size & vbCrLf)
Autodesk.Revit.UI.TaskDialog.Show("Revit", "The number of selected elements = " & selSet.Size & vbCrLf)
' look at each of them.
Dim str As String = ""
@@ -98,7 +98,7 @@ Public Class RvtCmd_Selection
" Cat=" & catName &
" Type=" & elem.Name & vbCrLf
Next
MsgBox(str)
Autodesk.Revit.UI.TaskDialog.Show("Revit", str)
Return Autodesk.Revit.UI.Result.Succeeded
@@ -70,14 +70,14 @@ Public Class RvtCmd_ShowElementData
Next
' how many did you get?
MsgBox("The number of selected elements:" & selSet.Size)
Autodesk.Revit.UI.TaskDialog.Show("Revit", "The number of selected elements:" & selSet.Size)
' look at each of them.
Dim elem As Autodesk.Revit.DB.Element
For Each elem In selSet
' show the type.
MsgBox(elem.GetType.ToString)
Autodesk.Revit.UI.TaskDialog.Show("Revit", elem.GetType.ToString)
' location
RvtUtils.ListLocation(elem)