replaced Revit 2020 SDK by Revit 2021 SDK

This commit is contained in:
Jeremy Tammik
2020-05-11 14:07:56 +02:00
parent 06ba6e0541
commit 64f8b0ed3e
250 changed files with 1225 additions and 1496 deletions
Binary file not shown.
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="AddInManager.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<AddInManager.Properties.Settings>
<setting name="AppFolder" serializeAs="String">
<value>Revit Add-In Manager 2021</value>
</setting>
</AddInManager.Properties.Settings>
</userSettings>
</configuration>
Binary file not shown.
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Command">
<Assembly>[TARGETDIR]AddInManager.dll</Assembly>
<ClientId>8C0A9E25-B7C5-421c-A1AB-702F73FA551F</ClientId>
<FullClassName>AddInManager.CAddInManager</FullClassName>
<Text>Add-In Manager (Manual Mode)</Text>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<LanguageType>Unknown</LanguageType>
<VendorId>ADSK</VendorId>
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
</AddIn>
<AddIn Type="Command">
<Assembly>[TARGETDIR]AddInManager.dll</Assembly>
<ClientId>6FDB8EC7-CCD3-4fc0-ADB7-B459D298FB93</ClientId>
<FullClassName>AddInManager.CAddInManagerFaceless</FullClassName>
<Text>Add-In Manager (Manual Mode, Faceless)</Text>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<LanguageType>Unknown</LanguageType>
<VendorId>ADSK</VendorId>
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
</AddIn>
<AddIn Type="Command">
<Assembly>[TARGETDIR]AddInManager.dll</Assembly>
<ClientId>91A2419C-5FCA-491A-BAA3-29A497EC07C7</ClientId>
<FullClassName>AddInManager.CAddInManagerReadOnly</FullClassName>
<Text>Add-In Manager (ReadOnly Mode)</Text>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<LanguageType>Unknown</LanguageType>
<VendorId>ADSK</VendorId>
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
</AddIn>
</RevitAddIns>
@@ -0,0 +1,22 @@
Copyright (c) 2009, wyDay
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>APIAppStartup</RootNamespace> <RootNamespace>APIAppStartup</RootNamespace>
<AssemblyName>APIAppStartup</AssemblyName> <AssemblyName>APIAppStartup</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AddSpaceAndZone</RootNamespace> <RootNamespace>AddSpaceAndZone</RootNamespace>
<AssemblyName>AddSpaceAndZone</AssemblyName> <AssemblyName>AddSpaceAndZone</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+1 -1
View File
@@ -18,7 +18,7 @@
</SccAuxPath> </SccAuxPath>
<SccProvider> <SccProvider>
</SccProvider> </SccProvider>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DistanceToSurfaces</RootNamespace> <RootNamespace>DistanceToSurfaces</RootNamespace>
<AssemblyName>DistanceToSurfaces</AssemblyName> <AssemblyName>DistanceToSurfaces</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Revit.SDK.Samples.MultithreadedCalculation.CS</RootNamespace> <RootNamespace>Revit.SDK.Samples.MultithreadedCalculation.CS</RootNamespace>
<AssemblyName>MultithreadedCalculation</AssemblyName> <AssemblyName>MultithreadedCalculation</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SpatialFieldGradient</RootNamespace> <RootNamespace>SpatialFieldGradient</RootNamespace>
<AssemblyName>SpatialFieldGradient</AssemblyName> <AssemblyName>SpatialFieldGradient</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AnalyticalSupportData_Info</RootNamespace> <RootNamespace>AnalyticalSupportData_Info</RootNamespace>
<AssemblyName>AnalyticalSupportData_Info</AssemblyName> <AssemblyName>AnalyticalSupportData_Info</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -1,10 +1,5 @@
<?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"> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
None
</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -17,7 +12,7 @@
<AssemblyName>AppearanceAssetEditing</AssemblyName> <AssemblyName>AppearanceAssetEditing</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -29,8 +24,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile> <DocumentationFile>bin\Debug\AppearanceAssetEditing.XML</DocumentationFile>
</DocumentationFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@@ -31,7 +31,7 @@
<MyType>Windows</MyType> <MyType>Windows</MyType>
<UpgradeBackupLocation> <UpgradeBackupLocation>
</UpgradeBackupLocation> </UpgradeBackupLocation>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -18,7 +18,7 @@
</SccAuxPath> </SccAuxPath>
<SccProvider> <SccProvider>
</SccProvider> </SccProvider>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -18,7 +18,7 @@
</SccAuxPath> </SccAuxPath>
<SccProvider> <SccProvider>
</SccProvider> </SccProvider>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -1,11 +1,5 @@
<?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"> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
None
</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -18,7 +12,7 @@
<AssemblyName>AttachedDetailGroup</AssemblyName> <AssemblyName>AttachedDetailGroup</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -92,4 +86,4 @@
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl" <PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl"
if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent> if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
+1 -1
View File
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AutoRoute</RootNamespace> <RootNamespace>AutoRoute</RootNamespace>
<AssemblyName>AutoRoute</AssemblyName> <AssemblyName>AutoRoute</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileUpgradeFlags> <FileUpgradeFlags>
</FileUpgradeFlags> </FileUpgradeFlags>
<UpgradeBackupLocation> <UpgradeBackupLocation>
@@ -18,7 +18,7 @@
</SccAuxPath> </SccAuxPath>
<SccProvider> <SccProvider>
</SccProvider> </SccProvider>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -9,7 +9,7 @@
<NoStandardLibraries>false</NoStandardLibraries> <NoStandardLibraries>false</NoStandardLibraries>
<AssemblyName>AvoidObstruction</AssemblyName> <AssemblyName>AvoidObstruction</AssemblyName>
<RootNamespace>AvoidObstruction</RootNamespace> <RootNamespace>AvoidObstruction</RootNamespace>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -27,7 +27,7 @@
</FileUpgradeFlags> </FileUpgradeFlags>
<UpgradeBackupLocation> <UpgradeBackupLocation>
</UpgradeBackupLocation> </UpgradeBackupLocation>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -20,7 +20,7 @@
</SccAuxPath> </SccAuxPath>
<SccProvider> <SccProvider>
</SccProvider> </SccProvider>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -44,7 +44,7 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -1,11 +1,5 @@
<?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"> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
None
</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -18,7 +12,7 @@
<AssemblyName>CapitalizeAllTextNotes</AssemblyName> <AssemblyName>CapitalizeAllTextNotes</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -92,4 +86,4 @@
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl" <PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl"
if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent> if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CompoundStructure</RootNamespace> <RootNamespace>CompoundStructure</RootNamespace>
<AssemblyName>CompoundStructure</AssemblyName> <AssemblyName>CompoundStructure</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<FileUpgradeFlags> <FileUpgradeFlags>
</FileUpgradeFlags> </FileUpgradeFlags>
@@ -20,7 +20,7 @@
</SccAuxPath> </SccAuxPath>
<SccProvider> <SccProvider>
</SccProvider> </SccProvider>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -27,7 +27,7 @@
</FileUpgradeFlags> </FileUpgradeFlags>
<UpgradeBackupLocation> <UpgradeBackupLocation>
</UpgradeBackupLocation> </UpgradeBackupLocation>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -30,7 +30,7 @@
<MyType>Windows</MyType> <MyType>Windows</MyType>
<UpgradeBackupLocation> <UpgradeBackupLocation>
</UpgradeBackupLocation> </UpgradeBackupLocation>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -18,7 +18,7 @@
</SccAuxPath> </SccAuxPath>
<SccProvider> <SccProvider>
</SccProvider> </SccProvider>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -18,7 +18,7 @@
</SccAuxPath> </SccAuxPath>
<SccProvider> <SccProvider>
</SccProvider> </SccProvider>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -12,7 +12,7 @@
<AssemblyName>CreateFillPattern</AssemblyName> <AssemblyName>CreateFillPattern</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -37,113 +37,123 @@ using RvtView = Autodesk.Revit.DB.View;
namespace Revit.SDK.Samples.CreateFillPattern.CS namespace Revit.SDK.Samples.CreateFillPattern.CS
{ {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public partial class PatternForm : System.Windows.Forms.Form public partial class PatternForm : System.Windows.Forms.Form
{ {
/// <summary> /// <summary>
/// Current UI document /// Current UI document
/// </summary> /// </summary>
UIDocument docUI; UIDocument docUI;
/// <summary> /// <summary>
/// Current revit document /// Current revit document
/// </summary> /// </summary>
Document doc; Document doc;
/// <summary> /// <summary>
/// Constructor /// Constructor
/// </summary> /// </summary>
public PatternForm(ExternalCommandData commandData) public PatternForm(ExternalCommandData commandData)
{ {
docUI = commandData.Application.ActiveUIDocument; docUI = commandData.Application.ActiveUIDocument;
doc = commandData.Application.ActiveUIDocument.Document; doc = commandData.Application.ActiveUIDocument.Document;
InitializeComponent(); InitializeComponent();
IniTreeView(); IniTreeView();
} }
/// <summary> /// <summary>
/// Select all elements in current document with specified element type filter /// Select all elements in current document with specified element type filter
/// </summary> /// </summary>
/// <typeparam name="T">Target element type</typeparam> /// <typeparam name="T">Target element type</typeparam>
/// <returns>List of the elements</returns> /// <returns>List of the elements</returns>
private List<T> GetAllElements<T>() private List<T> GetAllElements<T>()
{ {
ElementClassFilter elementFilter = new ElementClassFilter(typeof(T)); ElementClassFilter elementFilter = new ElementClassFilter(typeof(T));
FilteredElementCollector collector = new FilteredElementCollector(doc); FilteredElementCollector collector = new FilteredElementCollector(doc);
collector = collector.WherePasses(elementFilter); collector = collector.WherePasses(elementFilter);
return collector.Cast<T>().ToList(); return collector.Cast<T>().ToList();
} }
/// <summary> /// <summary>
/// Close the window after close button is clicked /// Close the window after close button is clicked
/// </summary> /// </summary>
/// <param name="sender">This object</param> /// <param name="sender">This object</param>
/// <param name="e">A object contains the event data</param> /// <param name="e">A object contains the event data</param>
private void buttonCancel_Click(object sender, EventArgs e) private void buttonCancel_Click(object sender, EventArgs e)
{ {
this.Close(); this.Close();
} }
/// <summary> /// <summary>
/// Initial nodes of treeviews /// Initial nodes of treeviews
/// </summary> /// </summary>
private void IniTreeView() private void IniTreeView()
{ {
this.treeViewLinePattern.Nodes.Clear(); this.treeViewLinePattern.Nodes.Clear();
TreeNode iniNode2 = new TreeNode("LinePatterns"); TreeNode iniNode2 = new TreeNode("LinePatterns");
treeViewLinePattern.Nodes.Add(iniNode2); treeViewLinePattern.Nodes.Add(iniNode2);
List<LinePatternElement> lstLinePatterns = GetAllElements<LinePatternElement>(); List<LinePatternElement> lstLinePatterns = GetAllElements<LinePatternElement>();
for (int i = 0; i < lstLinePatterns.Count; i++) for (int i = 0; i < lstLinePatterns.Count; i++)
{ {
TreeNode node = new TreeNode(lstLinePatterns[i].Name); TreeNode node = new TreeNode(lstLinePatterns[i].Name);
node.Name = lstLinePatterns[i].Id.IntegerValue.ToString(); node.Name = lstLinePatterns[i].Id.IntegerValue.ToString();
iniNode2.Nodes.Add(node); iniNode2.Nodes.Add(node);
} }
this.treeViewFillPattern.Nodes.Clear(); this.treeViewFillPattern.Nodes.Clear();
TreeNode iniNode1 = new TreeNode("FillPatterns"); TreeNode iniNode1 = new TreeNode("FillPatterns");
treeViewFillPattern.Nodes.Add(iniNode1); treeViewFillPattern.Nodes.Add(iniNode1);
List<FillPatternElement> lstFillPatterns = GetAllElements<FillPatternElement>(); List<FillPatternElement> lstFillPatterns = GetAllElements<FillPatternElement>();
for (int i = 0; i < lstFillPatterns.Count; i++) for (int i = 0; i < lstFillPatterns.Count; i++)
{ {
TreeNode node = new TreeNode(lstFillPatterns[i].Name); TreeNode node = new TreeNode(lstFillPatterns[i].Name);
node.Name = i.ToString(); node.Name = i.ToString();
iniNode1.Nodes.Add(node); iniNode1.Nodes.Add(node);
} }
} }
/// <summary> /// <summary>
/// Create a fillpattern element /// Create a fillpattern element
/// </summary> /// </summary>
/// <param name="patternName">The fillpattern name</param> /// <param name="patternName">The fillpattern name</param>
/// <returns>Created fillpattern element</returns> /// <returns>Created fillpattern element</returns>
private FillPatternElement CreateFacePattern(string patternName) private FillPatternElement GetOrCreateFacePattern(string patternName)
{ {
FillPatternTarget target = FillPatternTarget.Model;
FillPatternElement fillPatternElement = FillPatternElement.GetFillPatternElementByName(doc, target, patternName);
if (fillPatternElement == null)
{
//Create a fillpattern with specified angle and spacing //Create a fillpattern with specified angle and spacing
FillPattern fillPattern = new FillPattern(patternName, FillPatternTarget.Model, FillPattern fillPattern = new FillPattern(patternName, target,
FillPatternHostOrientation.ToView, 0.5, 0.5, 0.5); FillPatternHostOrientation.ToView, 0.5, 0.5, 0.5);
Transaction trans = new Transaction(doc); Transaction trans = new Transaction(doc);
trans.Start("Create a fillpattern element"); trans.Start("Create a fillpattern element");
FillPatternElement fillPatternElement = FillPatternElement.Create(doc, fillPattern); fillPatternElement = FillPatternElement.Create(doc, fillPattern);
trans.Commit(); trans.Commit();
return fillPatternElement; }
} return fillPatternElement;
}
/// <summary> /// <summary>
/// Create a complex fillpattern element /// Create a complex fillpattern element
/// </summary> /// </summary>
/// <param name="patternName">The fillpattern name</param> /// <param name="patternName">The fillpattern name</param>
/// <returns>Created fillpattern element</returns> /// <returns>Created fillpattern element</returns>
private FillPatternElement CreateComplexFacePattern(string patternName) private FillPatternElement GetOrCreateComplexFacePattern(string patternName)
{ {
FillPatternElement fillPatternElement = null; FillPatternTarget target = FillPatternTarget.Model;
FillPatternElement fillPatternElement = FillPatternElement.GetFillPatternElementByName(doc, target, patternName);
if (fillPatternElement == null)
{
// Create the fill pattern // Create the fill pattern
FillPattern fillPattern = new FillPattern("API-created", FillPatternTarget.Model, FillPattern fillPattern = new FillPattern(patternName, target,
FillPatternHostOrientation.ToHost); FillPatternHostOrientation.ToHost);
// Add grids // Add grids
@@ -165,304 +175,306 @@ namespace Revit.SDK.Samples.CreateFillPattern.CS
fillPatternElement = FillPatternElement.Create(doc, fillPattern); fillPatternElement = FillPatternElement.Create(doc, fillPattern);
t.Commit(); t.Commit();
return fillPatternElement; }
}
/// <summary> return fillPatternElement;
/// Create a fillgrid }
/// </summary>
/// <param name="origin"></param>
/// <param name="offset"></param>
/// <param name="angle"></param>
/// <param name="shift"></param>
/// <param name="segments"></param>
/// <returns></returns>
private FillGrid CreateGrid(UV origin, double offset, double angle,
double shift, params double[] segments)
{
FillGrid fillGrid = new FillGrid();
// The arguments: origin, offset (vertical distance between lines),
// angle, shift (delta between location of start point per line)
// The last two arguments are the segments: e.g. 1.0 units on,
// 0.1 units off (units are Revit units (ft))
fillGrid.Origin = origin;
fillGrid.Offset = offset;
fillGrid.Angle = angle;
fillGrid.Shift = shift;
List<double> segmentsList = new List<double>();
foreach (double d in segments)
{
segmentsList.Add(d);
}
fillGrid.SetSegments(segmentsList);
return fillGrid; /// <summary>
} /// Create a fillgrid
/// </summary>
/// <param name="origin"></param>
/// <param name="offset"></param>
/// <param name="angle"></param>
/// <param name="shift"></param>
/// <param name="segments"></param>
/// <returns></returns>
private FillGrid CreateGrid(UV origin, double offset, double angle,
double shift, params double[] segments)
{
FillGrid fillGrid = new FillGrid();
// The arguments: origin, offset (vertical distance between lines),
// angle, shift (delta between location of start point per line)
// The last two arguments are the segments: e.g. 1.0 units on,
// 0.1 units off (units are Revit units (ft))
fillGrid.Origin = origin;
fillGrid.Offset = offset;
fillGrid.Angle = angle;
fillGrid.Shift = shift;
List<double> segmentsList = new List<double>();
foreach (double d in segments)
{
segmentsList.Add(d);
}
fillGrid.SetSegments(segmentsList);
return fillGrid;
}
/// <summary> /// <summary>
/// Create a linepattern element /// Create a linepattern element
/// </summary> /// </summary>
/// <param name="patternName">The linepattern name</param> /// <param name="patternName">The linepattern name</param>
/// <returns>Created linepattern element</returns> /// <returns>Created linepattern element</returns>
private LinePatternElement CreateLinePatternElement(string patternName) private LinePatternElement CreateLinePatternElement(string patternName)
{ {
//Create list of segments which define the line pattern //Create list of segments which define the line pattern
List<LinePatternSegment> lstSegments = new List<LinePatternSegment>(); List<LinePatternSegment> lstSegments = new List<LinePatternSegment>();
lstSegments.Add(new LinePatternSegment(LinePatternSegmentType.Dot, 0.0)); lstSegments.Add(new LinePatternSegment(LinePatternSegmentType.Dot, 0.0));
lstSegments.Add(new LinePatternSegment(LinePatternSegmentType.Space, 0.02)); lstSegments.Add(new LinePatternSegment(LinePatternSegmentType.Space, 0.02));
lstSegments.Add(new LinePatternSegment(LinePatternSegmentType.Dash, 0.03)); lstSegments.Add(new LinePatternSegment(LinePatternSegmentType.Dash, 0.03));
lstSegments.Add(new LinePatternSegment(LinePatternSegmentType.Space, 0.02)); lstSegments.Add(new LinePatternSegment(LinePatternSegmentType.Space, 0.02));
LinePattern linePattern = new LinePattern(patternName); LinePattern linePattern = new LinePattern(patternName);
linePattern.SetSegments(lstSegments); linePattern.SetSegments(lstSegments);
Transaction trans = new Transaction(doc); Transaction trans = new Transaction(doc);
trans.Start("Create a linepattern element"); trans.Start("Create a linepattern element");
LinePatternElement linePatternElement = LinePatternElement.Create(doc, linePattern); LinePatternElement linePatternElement = LinePatternElement.Create(doc, linePattern);
trans.Commit(); trans.Commit();
return linePatternElement; return linePatternElement;
} }
/// <summary> /// <summary>
/// Create a fillpattern element and apply it to target material /// Create a fillpattern element and apply it to target material
/// </summary> /// </summary>
/// <param name="sender">This object</param> /// <param name="sender">This object</param>
/// <param name="e">A object contains the event data</param> /// <param name="e">A object contains the event data</param>
private void buttonCreateFillPattern_Click(object sender, EventArgs e) private void buttonCreateFillPattern_Click(object sender, EventArgs e)
{ {
Wall targetWall = GetSelectedWall(); Wall targetWall = GetSelectedWall();
if (targetWall == null) if (targetWall == null)
{ {
TaskDialog.Show("Create Fill Pattern", TaskDialog.Show("Create Fill Pattern",
"Before applying FillPattern to a wall's surfaces, you must firstly select a wall."); "Before applying a FillPattern to a wall's surfaces, you must first select a wall.");
this.Close();
return;
}
FillPatternElement mySurfacePattern = CreateFacePattern("MySurfacePattern");
Material targetMaterial = doc.GetElement(targetWall.GetMaterialIds(false).First<ElementId>()) as Material;
Transaction trans = new Transaction(doc);
trans.Start("Apply fillpattern to surface");
targetMaterial.SurfaceForegroundPatternId = mySurfacePattern.Id;
trans.Commit();
this.Close(); this.Close();
} return;
}
/// <summary> FillPatternElement mySurfacePattern = GetOrCreateFacePattern("MySurfacePattern");
/// Create a linepattern element and apply it to grids Material targetMaterial = doc.GetElement(targetWall.GetMaterialIds(false).First<ElementId>()) as Material;
/// </summary> Transaction trans = new Transaction(doc);
/// <param name="sender">This object</param> trans.Start("Apply fillpattern to surface");
/// <param name="e">A object contains the event data</param> targetMaterial.SurfaceForegroundPatternId = mySurfacePattern.Id;
private void buttonCreateLinePattern_Click(object sender, EventArgs e) trans.Commit();
{ this.Close();
List<ElementId> lstGridTypeIds = new List<ElementId>(); }
GetSelectedGridTypeIds(lstGridTypeIds);
if (lstGridTypeIds.Count == 0)
{
TaskDialog.Show("Apply To Grids",
"Before applying LinePattern to Grids, you must firstly select at least one grid.");
this.Close();
return;
}
LinePatternElement myLinePatternElement = CreateLinePatternElement("MyLinePattern"); /// <summary>
foreach (ElementId typeId in lstGridTypeIds) /// Create a linepattern element and apply it to grids
{ /// </summary>
Element gridType = doc.GetElement(typeId); /// <param name="sender">This object</param>
//set the parameter value of End Segment Pattern /// <param name="e">A object contains the event data</param>
SetParameter("End Segment Pattern", myLinePatternElement.Id, gridType); private void buttonCreateLinePattern_Click(object sender, EventArgs e)
} {
List<ElementId> lstGridTypeIds = new List<ElementId>();
GetSelectedGridTypeIds(lstGridTypeIds);
if (lstGridTypeIds.Count == 0)
{
TaskDialog.Show("Apply To Grids",
"Before applying a LinePattern to Grids, you must first select at least one grid.");
this.Close(); this.Close();
} return;
}
/// <summary> LinePatternElement myLinePatternElement = CreateLinePatternElement("MyLinePattern");
/// Set a parameter value of a target element foreach (ElementId typeId in lstGridTypeIds)
/// </summary> {
/// <param name="paramName">The parameter name</param> Element gridType = doc.GetElement(typeId);
/// <param name="eid">Id value of the parameter</param> //set the parameter value of End Segment Pattern
/// <param name="elem">Target element</param> SetParameter("End Segment Pattern", myLinePatternElement.Id, gridType);
private void SetParameter(string paramName, ElementId eid, Element elem) }
{ this.Close();
foreach (Parameter param in elem.Parameters) }
/// <summary>
/// Set a parameter value of a target element
/// </summary>
/// <param name="paramName">The parameter name</param>
/// <param name="eid">Id value of the parameter</param>
/// <param name="elem">Target element</param>
private void SetParameter(string paramName, ElementId eid, Element elem)
{
foreach (Parameter param in elem.Parameters)
{
if (param.Definition.Name == paramName)
{ {
if (param.Definition.Name == paramName) Transaction trans = new Transaction(doc);
{ trans.Start("Set parameter value");
Transaction trans = new Transaction(doc); param.Set(eid);
trans.Start("Set parameter value"); trans.Commit();
param.Set(eid); break;
trans.Commit();
break;
}
} }
} }
}
/// <summary>
/// Apply fillpattern to surface
/// </summary>
/// <param name="sender">This object</param>
/// <param name="e">A object contains the event data</param>
private void buttonApplyToSurface_Click(object sender, EventArgs e)
{
Wall targetWall = GetSelectedWall();
if (targetWall == null)
{
TaskDialog.Show("Apply To Surface",
"Before applying FillPattern to a wall's surfaces, you must firstly select a wall.");
this.Close();
return;
}
if (treeViewFillPattern.SelectedNode == null || treeViewFillPattern.SelectedNode.Parent == null)
{
TaskDialog.Show("Apply To Surface",
"Before applying FillPattern to a wall's surfaces, you must firstly select one FillPattern.");
return;
}
List<FillPatternElement> lstPatterns = GetAllElements<FillPatternElement>();
int patternIndex = int.Parse(treeViewFillPattern.SelectedNode.Name);
Material targetMaterial = doc.GetElement(targetWall.GetMaterialIds(false).First<ElementId>()) as Material;
Transaction trans = new Transaction(doc);
trans.Start("Apply fillpattern to surface");
targetMaterial.SurfaceForegroundPatternId = lstPatterns[patternIndex].Id;
trans.Commit();
/// <summary>
/// Apply fillpattern to surface
/// </summary>
/// <param name="sender">This object</param>
/// <param name="e">A object contains the event data</param>
private void buttonApplyToSurface_Click(object sender, EventArgs e)
{
Wall targetWall = GetSelectedWall();
if (targetWall == null)
{
TaskDialog.Show("Apply To Surface",
"Before applying a FillPattern to a wall's surfaces, you must first select a wall.");
this.Close(); this.Close();
} return;
}
/// <summary> if (treeViewFillPattern.SelectedNode == null || treeViewFillPattern.SelectedNode.Parent == null)
/// Get a selected wall {
/// </summary> TaskDialog.Show("Apply To Surface",
/// <returns>Selected wall</returns> "Before applying a FillPattern to a wall's surfaces, you must first select one FillPattern.");
private Wall GetSelectedWall() return;
{ }
Wall wall = null;
foreach (ElementId elemId in docUI.Selection.GetElementIds())
{
Element elem = doc.GetElement(elemId);
wall = elem as Wall;
if (wall != null)
return wall;
}
return wall;
}
/// <summary> List<FillPatternElement> lstPatterns = GetAllElements<FillPatternElement>();
/// Apply fillpatterns to cutting surface int patternIndex = int.Parse(treeViewFillPattern.SelectedNode.Name);
/// </summary> Material targetMaterial = doc.GetElement(targetWall.GetMaterialIds(false).First<ElementId>()) as Material;
/// <param name="sender">This object</param> Transaction trans = new Transaction(doc);
/// <param name="e">A object contains the event data</param> trans.Start("Apply fillpattern to surface");
private void buttonApplyToCutSurface_Click(object sender, EventArgs e) targetMaterial.SurfaceForegroundPatternId = lstPatterns[patternIndex].Id;
{ trans.Commit();
Wall targetWall = GetSelectedWall();
if (targetWall == null)
{
TaskDialog.Show("Apply To CutSurface",
"Before applying FillPattern to a wall's cutting surfaces, you must firstly select a wall.");
this.Close();
return;
}
if (treeViewFillPattern.SelectedNode == null || treeViewFillPattern.SelectedNode.Parent == null) this.Close();
{ }
TaskDialog.Show("Apply To CutSurface",
"Before applying FillPattern to a wall's cutting surfaces, you must firstly select one FillPattern.");
return;
}
List<FillPatternElement> lstPatterns = GetAllElements<FillPatternElement>(); /// <summary>
int patternIndex = int.Parse(treeViewFillPattern.SelectedNode.Name); /// Get a selected wall
Material targetMaterial = doc.GetElement(targetWall.GetMaterialIds(false).First<ElementId>()) as Material; /// </summary>
/// <returns>Selected wall</returns>
Transaction trans = new Transaction(doc); private Wall GetSelectedWall()
trans.Start("Apply fillpattern to cutting surface"); {
targetMaterial.CutForegroundPatternId = lstPatterns[patternIndex].Id; Wall wall = null;
trans.Commit(); foreach (ElementId elemId in docUI.Selection.GetElementIds())
{
Element elem = doc.GetElement(elemId);
wall = elem as Wall;
if (wall != null)
return wall;
}
return wall;
}
/// <summary>
/// Apply fillpatterns to cutting surface
/// </summary>
/// <param name="sender">This object</param>
/// <param name="e">A object contains the event data</param>
private void buttonApplyToCutSurface_Click(object sender, EventArgs e)
{
Wall targetWall = GetSelectedWall();
if (targetWall == null)
{
TaskDialog.Show("Apply To CutSurface",
"Before applying a FillPattern to a wall's cut surfaces, you must first select a wall.");
this.Close(); this.Close();
} return;
}
/// <summary> if (treeViewFillPattern.SelectedNode == null || treeViewFillPattern.SelectedNode.Parent == null)
/// Apply linepattern to grids {
/// </summary> TaskDialog.Show("Apply To CutSurface",
/// <param name="sender">This object</param> "Before applying a FillPattern to a wall's cutting surfaces, you must first select a FillPattern.");
/// <param name="e">A object contains the event data</param> return;
private void buttonApplyToGrids_Click(object sender, EventArgs e) }
{
List<ElementId> lstGridTypeIds = new List<ElementId>();
GetSelectedGridTypeIds(lstGridTypeIds);
if (lstGridTypeIds.Count == 0)
{
TaskDialog.Show("Apply To Grids",
"Before applying LinePattern to Grids, you must firstly select at least one grid.");
this.Close();
return;
}
if (treeViewLinePattern.SelectedNode == null || treeViewLinePattern.Parent == null) List<FillPatternElement> lstPatterns = GetAllElements<FillPatternElement>();
{ int patternIndex = int.Parse(treeViewFillPattern.SelectedNode.Name);
TaskDialog.Show("Apply To Grids", Material targetMaterial = doc.GetElement(targetWall.GetMaterialIds(false).First<ElementId>()) as Material;
"Before applying LinePattern to Grids, you must firstly select a LinePattern.");
return; Transaction trans = new Transaction(doc);
} trans.Start("Apply fillpattern to cutting surface");
ElementId eid = new ElementId(int.Parse(treeViewLinePattern.SelectedNode.Name)); targetMaterial.CutForegroundPatternId = lstPatterns[patternIndex].Id;
foreach (ElementId typeId in lstGridTypeIds) trans.Commit();
{
Element gridType = doc.GetElement(typeId); this.Close();
//set the parameter value of End Segment Pattern }
SetParameter("End Segment Pattern", eid, gridType);
} /// <summary>
/// Apply linepattern to grids
/// </summary>
/// <param name="sender">This object</param>
/// <param name="e">A object contains the event data</param>
private void buttonApplyToGrids_Click(object sender, EventArgs e)
{
List<ElementId> lstGridTypeIds = new List<ElementId>();
GetSelectedGridTypeIds(lstGridTypeIds);
if (lstGridTypeIds.Count == 0)
{
TaskDialog.Show("Apply To Grids",
"Before applying a LinePattern to Grids, you must first select at least one grid.");
this.Close(); this.Close();
} return;
}
/// <summary> if (treeViewLinePattern.SelectedNode == null || treeViewLinePattern.Parent == null)
/// Get selected GridType Ids {
/// </summary> TaskDialog.Show("Apply To Grids",
/// <param name="lstGridTypeIds">Selected GridType Ids</param> "Before applying a LinePattern to Grids, you must first select a LinePattern.");
private void GetSelectedGridTypeIds(List<ElementId> lstGridTypeIds) return;
{ }
foreach (ElementId elemId in docUI.Selection.GetElementIds()) ElementId eid = new ElementId(int.Parse(treeViewLinePattern.SelectedNode.Name));
{ foreach (ElementId typeId in lstGridTypeIds)
Element elem = doc.GetElement(elemId); {
Grid grid = elem as Grid; Element gridType = doc.GetElement(typeId);
if (grid != null) //set the parameter value of End Segment Pattern
{ SetParameter("End Segment Pattern", eid, gridType);
ElementId gridTypeId = grid.GetTypeId(); }
if (!lstGridTypeIds.Contains(gridTypeId)) this.Close();
lstGridTypeIds.Add(gridTypeId); }
}
}
}
/// <summary> /// <summary>
/// To create a brick-like patternss /// Get selected GridType Ids
/// </summary> /// </summary>
/// <param name="sender">This object</param> /// <param name="lstGridTypeIds">Selected GridType Ids</param>
/// <param name="e">A object contains the event data</param> private void GetSelectedGridTypeIds(List<ElementId> lstGridTypeIds)
private void buttonCreateComplexFillPattern_Click(object sender, EventArgs e) {
{ foreach (ElementId elemId in docUI.Selection.GetElementIds())
Wall targetWall = GetSelectedWall(); {
if (targetWall == null) Element elem = doc.GetElement(elemId);
Grid grid = elem as Grid;
if (grid != null)
{ {
TaskDialog.Show("Create Fill Pattern", ElementId gridTypeId = grid.GetTypeId();
"Before applying FillPattern to a wall's surfaces, you must firstly select a wall."); if (!lstGridTypeIds.Contains(gridTypeId))
this.Close(); lstGridTypeIds.Add(gridTypeId);
return;
} }
}
}
FillPatternElement mySurfacePattern = CreateComplexFacePattern("MyComplexPattern"); /// <summary>
Material targetMaterial = doc.GetElement(targetWall.GetMaterialIds(false).First<ElementId>()) as Material; /// To create a brick-like patternss
Transaction trans = new Transaction(doc); /// </summary>
trans.Start("Apply complex fillpattern to surface"); /// <param name="sender">This object</param>
targetMaterial.SurfaceForegroundPatternId = mySurfacePattern.Id; /// <param name="e">A object contains the event data</param>
trans.Commit(); private void buttonCreateComplexFillPattern_Click(object sender, EventArgs e)
{
Wall targetWall = GetSelectedWall();
if (targetWall == null)
{
TaskDialog.Show("Create Fill Pattern",
"Before applying a FillPattern to a wall's surfaces, you must first select a wall.");
this.Close(); this.Close();
} return;
}
private void PatternForm_Load(object sender, EventArgs e) FillPatternElement mySurfacePattern = GetOrCreateComplexFacePattern("MyComplexPattern");
{ Material targetMaterial = doc.GetElement(targetWall.GetMaterialIds(false).First<ElementId>()) as Material;
Transaction trans = new Transaction(doc);
trans.Start("Apply complex fillpattern to surface");
targetMaterial.SurfaceForegroundPatternId = mySurfacePattern.Id;
trans.Commit();
this.Close();
}
} private void PatternForm_Load(object sender, EventArgs e)
} {
}
}
} }
@@ -31,7 +31,7 @@
<MyType>Windows</MyType> <MyType>Windows</MyType>
<UpgradeBackupLocation> <UpgradeBackupLocation>
</UpgradeBackupLocation> </UpgradeBackupLocation>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -18,7 +18,7 @@
</SccAuxPath> </SccAuxPath>
<SccProvider> <SccProvider>
</SccProvider> </SccProvider>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -1,11 +1,5 @@
<?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"> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
None
</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -18,7 +12,7 @@
<AssemblyName>CreateTrianglesTopography</AssemblyName> <AssemblyName>CreateTrianglesTopography</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -80,4 +74,4 @@
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl" <PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl"
if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent> if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
@@ -31,7 +31,7 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CreateWallinBeamProfile</RootNamespace> <RootNamespace>CreateWallinBeamProfile</RootNamespace>
<AssemblyName>CreateWallinBeamProfile</AssemblyName> <AssemblyName>CreateWallinBeamProfile</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -18,7 +18,7 @@
</SccAuxPath> </SccAuxPath>
<SccProvider> <SccProvider>
</SccProvider> </SccProvider>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Revit.SDK.Samples.CurtainSystem.CS</RootNamespace> <RootNamespace>Revit.SDK.Samples.CurtainSystem.CS</RootNamespace>
<AssemblyName>CurtainSystem</AssemblyName> <AssemblyName>CurtainSystem</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CurtainWallGrid</RootNamespace> <RootNamespace>CurtainWallGrid</RootNamespace>
<AssemblyName>CurtainWallGrid</AssemblyName> <AssemblyName>CurtainWallGrid</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -623,11 +623,10 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS
Vector4 vec = new Vector4(xyz); Vector4 vec = new Vector4(xyz);
vec = m_coordinates.RestoreMatrix.Transform(vec); vec = m_coordinates.RestoreMatrix.Transform(vec);
offset = vec.Z - m_geometry.LineToBeMoved.FullCurve.GetEndPoint(0).Z; offset = vec.Z - m_geometry.LineToBeMoved.FullCurve.GetEndPoint(0).Z;
offset = Unit.CovertFromAPI(m_myDocument.LengthUnitType, offset); offset = Unit.CovertFromAPI(m_myDocument.LengthUnit, offset);
// showing the move offset // showing the move offset
m_drawObject.Text = "Offset: " + Math.Round(offset, 1) + m_drawObject.Text = "Offset: " + Math.Round(offset, 1) + Unit.GetUnitLabel(m_myDocument.LengthUnit);
Revit.SDK.Samples.CurtainWallGrid.CS.Properties.Resources.ResourceManager.GetString(m_myDocument.LengthUnitType.ToString());
m_drawObject.TextPosition = mousePosition; m_drawObject.TextPosition = mousePosition;
m_drawObject.TextPen = redPen; m_drawObject.TextPen = redPen;
return; return;
@@ -653,11 +652,10 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS
Vector4 vec = new Vector4(xyz); Vector4 vec = new Vector4(xyz);
vec = m_coordinates.RestoreMatrix.Transform(vec); vec = m_coordinates.RestoreMatrix.Transform(vec);
offset = vec.X - m_geometry.LineToBeMoved.FullCurve.GetEndPoint(0).X; offset = vec.X - m_geometry.LineToBeMoved.FullCurve.GetEndPoint(0).X;
offset = Unit.CovertFromAPI(m_myDocument.LengthUnitType, offset); offset = Unit.CovertFromAPI(m_myDocument.LengthUnit, offset);
// showing the move offset // showing the move offset
m_drawObject.Text = "Offset: " + Math.Round(offset, 1) + m_drawObject.Text = "Offset: " + Math.Round(offset, 1) + Unit.GetUnitLabel(m_myDocument.LengthUnit);
Revit.SDK.Samples.CurtainWallGrid.CS.Properties.Resources.ResourceManager.GetString(m_myDocument.LengthUnitType.ToString());
m_drawObject.TextPosition = mousePosition; m_drawObject.TextPosition = mousePosition;
m_drawObject.TextPen = redPen; m_drawObject.TextPen = redPen;
} }
+7 -7
View File
@@ -102,7 +102,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS
LineOperation m_activeOperation; LineOperation m_activeOperation;
// the length unit type for the active Revit document // the length unit type for the active Revit document
DisplayUnitType m_LengthUnitType; ForgeTypeId m_LengthUnit;
// store the message of the sample // store the message of the sample
private KeyValuePair<string/*msgText*/, bool/*is warningOrError*/> m_message; private KeyValuePair<string/*msgText*/, bool/*is warningOrError*/> m_message;
@@ -199,11 +199,11 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS
} }
} }
public DisplayUnitType LengthUnitType public ForgeTypeId LengthUnit
{ {
get get
{ {
return m_LengthUnitType; return m_LengthUnit;
} }
} }
@@ -271,16 +271,16 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS
/// </summary> /// </summary>
private void GetLengthUnitType() private void GetLengthUnitType()
{ {
UnitType unitType = UnitType.UT_Length; ForgeTypeId specTypeId = SpecTypeId.Length;
Units projectUnit = m_document.GetUnits(); Units projectUnit = m_document.GetUnits();
try try
{ {
Autodesk.Revit.DB.FormatOptions formatOption = projectUnit.GetFormatOptions(unitType); Autodesk.Revit.DB.FormatOptions formatOption = projectUnit.GetFormatOptions(specTypeId);
m_LengthUnitType = formatOption.DisplayUnits; m_LengthUnit = formatOption.GetUnitTypeId();
} }
catch (System.Exception /*e*/) catch (System.Exception /*e*/)
{ {
m_LengthUnitType = DisplayUnitType.DUT_DECIMAL_FEET; m_LengthUnit = UnitTypeId.Feet;
} }
} }
@@ -8,8 +8,7 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace Revit.SDK.Samples.CurtainWallGrid.CS.Properties namespace CurtainWallGrid.Properties {
{
using System; using System;
@@ -20,7 +19,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS.Properties
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
@@ -60,77 +59,5 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS.Properties
resourceCulture = value; resourceCulture = value;
} }
} }
/// <summary>
/// Looks up a localized string similar to cm.
/// </summary>
internal static string DUT_CENTIMETERS {
get {
return ResourceManager.GetString("DUT_CENTIMETERS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &apos;.
/// </summary>
internal static string DUT_DECIMAL_FEET {
get {
return ResourceManager.GetString("DUT_DECIMAL_FEET", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &quot;.
/// </summary>
internal static string DUT_DECIMAL_INCHES {
get {
return ResourceManager.GetString("DUT_DECIMAL_INCHES", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &apos;.
/// </summary>
internal static string DUT_FEET_FRACTIONAL_INCHES {
get {
return ResourceManager.GetString("DUT_FEET_FRACTIONAL_INCHES", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &quot;.
/// </summary>
internal static string DUT_FRACTIONAL_INCHES {
get {
return ResourceManager.GetString("DUT_FRACTIONAL_INCHES", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to m.
/// </summary>
internal static string DUT_METERS {
get {
return ResourceManager.GetString("DUT_METERS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to m.
/// </summary>
internal static string DUT_METERS_CENTIMETERS {
get {
return ResourceManager.GetString("DUT_METERS_CENTIMETERS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to mm.
/// </summary>
internal static string DUT_MILLIMETERS {
get {
return ResourceManager.GetString("DUT_MILLIMETERS", resourceCulture);
}
}
} }
} }
@@ -112,33 +112,9 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="DUT_CENTIMETERS" xml:space="preserve">
<value>cm</value>
</data>
<data name="DUT_DECIMAL_FEET" xml:space="preserve">
<value>'</value>
</data>
<data name="DUT_DECIMAL_INCHES" xml:space="preserve">
<value>"</value>
</data>
<data name="DUT_FEET_FRACTIONAL_INCHES" xml:space="preserve">
<value>'</value>
</data>
<data name="DUT_FRACTIONAL_INCHES" xml:space="preserve">
<value>"</value>
</data>
<data name="DUT_METERS" xml:space="preserve">
<value>m</value>
</data>
<data name="DUT_METERS_CENTIMETERS" xml:space="preserve">
<value>m</value>
</data>
<data name="DUT_MILLIMETERS" xml:space="preserve">
<value>mm</value>
</data>
</root> </root>
+35 -21
View File
@@ -38,10 +38,10 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS
{ {
#region Methods #region Methods
/// <summary> /// <summary>
/// Convert the value get from RevitAPI to the value indicated by DisplayUnitType /// Convert the value get from RevitAPI to the value indicated by ForgeTypeId
/// </summary> /// </summary>
/// <param name="to"> /// <param name="to">
/// DisplayUnitType indicates unit of target value /// ForgeTypeId indicates unit of target value
/// </param> /// </param>
/// <param name="value"> /// <param name="value">
/// value get from RevitAPI /// value get from RevitAPI
@@ -49,51 +49,65 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS
/// <returns> /// <returns>
/// Target value /// Target value
/// </returns> /// </returns>
public static double CovertFromAPI(DisplayUnitType to, double value) public static double CovertFromAPI(ForgeTypeId to, double value)
{ {
return value *= ImperialDutRatio(to); return value *= ImperialDutRatio(to);
} }
/// <summary> /// <summary>
/// Convert a value indicated by DisplayUnitType to the value used by RevitAPI /// Convert a value indicated by ForgeTypeId to the value used by RevitAPI
/// </summary> /// </summary>
/// <param name="value"> /// <param name="value">
/// Value to be converted /// Value to be converted
/// </param> /// </param>
/// <param name="from"> /// <param name="from">
/// DisplayUnitType indicates the unit of the value to be converted /// ForgeTypeId indicates the unit of the value to be converted
/// </param> /// </param>
/// <returns> /// <returns>
/// Target value /// Target value
/// </returns> /// </returns>
public static double CovertToAPI(double value, DisplayUnitType from) public static double CovertToAPI(double value, ForgeTypeId from)
{ {
return value /= ImperialDutRatio(from); return value /= ImperialDutRatio(from);
} }
/// <summary> /// <summary>
/// Get ratio between value in RevitAPI and value to display indicated by DisplayUnitType /// Get ratio between value in RevitAPI and value to display indicated by ForgeTypeId
/// </summary> /// </summary>
/// <param name="dut"> /// <param name="dut">
/// DisplayUnitType indicates display unit type /// ForgeTypeId indicates display unit type
/// </param> /// </param>
/// <returns> /// <returns>
/// Ratio /// Ratio
/// </returns> /// </returns>
private static double ImperialDutRatio(DisplayUnitType dut) private static double ImperialDutRatio(ForgeTypeId unitTypeId)
{ {
switch (dut) if (unitTypeId == UnitTypeId.Feet) return 1;
{ if (unitTypeId == UnitTypeId.FeetFractionalInches) return 1;
case DisplayUnitType.DUT_DECIMAL_FEET: return 1; if (unitTypeId == UnitTypeId.Inches) return 12;
case DisplayUnitType.DUT_FEET_FRACTIONAL_INCHES: return 1; if (unitTypeId == UnitTypeId.FractionalInches) return 12;
case DisplayUnitType.DUT_DECIMAL_INCHES: return 12; if (unitTypeId == UnitTypeId.Meters) return 0.3048;
case DisplayUnitType.DUT_FRACTIONAL_INCHES: return 12; if (unitTypeId == UnitTypeId.Centimeters) return 30.48;
case DisplayUnitType.DUT_METERS: return 0.3048; if (unitTypeId == UnitTypeId.Millimeters) return 304.8;
case DisplayUnitType.DUT_CENTIMETERS: return 30.48; if (unitTypeId == UnitTypeId.MetersCentimeters) return 0.3048;
case DisplayUnitType.DUT_MILLIMETERS: return 304.8; return 1;
case DisplayUnitType.DUT_METERS_CENTIMETERS: return 0.3048; }
default: return 1;
} public static string GetUnitLabel(ForgeTypeId unitTypeId)
{
Dictionary<ForgeTypeId, string> unitLabels = new Dictionary<ForgeTypeId, string> {
{ UnitTypeId.Centimeters, "cm" },
{ UnitTypeId.Feet, "'" },
{ UnitTypeId.Inches, "\"" },
{ UnitTypeId.FeetFractionalInches, "'" },
{ UnitTypeId.FractionalInches, "\"" },
{ UnitTypeId.Meters, "m" },
{ UnitTypeId.MetersCentimeters, "m" },
{ UnitTypeId.Millimeters, "mm" }
};
if (unitLabels.ContainsKey(unitTypeId))
return unitLabels[unitTypeId];
return string.Empty;
} }
#endregion #endregion
} }
@@ -279,12 +279,13 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS
private void WriteCoordinate(Graphics graphics, Pen pen) private void WriteCoordinate(Graphics graphics, Pen pen)
{ {
PointD assistPointD = ConvertToPointD(m_wallLine2D.AssistantPoint); PointD assistPointD = ConvertToPointD(m_wallLine2D.AssistantPoint);
double x = Unit.CovertFromAPI(m_myDocument.LengthUnitType, assistPointD.X); double x = Unit.CovertFromAPI(m_myDocument.LengthUnit, assistPointD.X);
double y = Unit.CovertFromAPI(m_myDocument.LengthUnitType, assistPointD.Y); double y = Unit.CovertFromAPI(m_myDocument.LengthUnit, assistPointD.Y);
string xCoorString = Convert.ToString(Math.Round(x, 1)); string xCoorString = Convert.ToString(Math.Round(x, 1));
string yCoorString = Convert.ToString(Math.Round(y, 1)); string yCoorString = Convert.ToString(Math.Round(y, 1));
string unitType = Revit.SDK.Samples.CurtainWallGrid.CS.Properties.Resources.ResourceManager.GetString(m_myDocument.LengthUnitType.ToString());
string unitType = Unit.GetUnitLabel(m_myDocument.LengthUnit);
String coordinate = "(" + xCoorString + unitType + "," + yCoorString + unitType + ")"; String coordinate = "(" + xCoorString + unitType + "," + yCoorString + unitType + ")";
graphics.DrawString(coordinate, m_coordinateFont, Brushes.Blue, graphics.DrawString(coordinate, m_coordinateFont, Brushes.Blue,
new PointF(m_wallLine2D.AssistantPoint.X + 2, m_wallLine2D.AssistantPoint.Y + 2)); new PointF(m_wallLine2D.AssistantPoint.X + 2, m_wallLine2D.AssistantPoint.Y + 2));
+1 -1
View File
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Revit.SDK.Samples.CurvedBeam.CS</RootNamespace> <RootNamespace>Revit.SDK.Samples.CurvedBeam.CS</RootNamespace>
<AssemblyName>CurvedBeam</AssemblyName> <AssemblyName>CurvedBeam</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -12,7 +12,7 @@
<AssemblyName>Custom2DExporter</AssemblyName> <AssemblyName>Custom2DExporter</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
None
</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -18,7 +12,7 @@
<AssemblyName>DatumsModification</AssemblyName> <AssemblyName>DatumsModification</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -133,4 +127,4 @@
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl" <PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl"
if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent> if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DeckProperties</RootNamespace> <RootNamespace>DeckProperties</RootNamespace>
<AssemblyName>DeckProperties</AssemblyName> <AssemblyName>DeckProperties</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -18,7 +18,7 @@
</SccAuxPath> </SccAuxPath>
<SccProvider> <SccProvider>
</SccProvider> </SccProvider>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -27,7 +27,7 @@
</FileUpgradeFlags> </FileUpgradeFlags>
<UpgradeBackupLocation> <UpgradeBackupLocation>
</UpgradeBackupLocation> </UpgradeBackupLocation>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -30,7 +30,7 @@
<MyType>Windows</MyType> <MyType>Windows</MyType>
<UpgradeBackupLocation> <UpgradeBackupLocation>
</UpgradeBackupLocation> </UpgradeBackupLocation>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -44,7 +44,7 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
None
</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -18,7 +12,7 @@
<AssemblyName>DimensionLeaderEnd</AssemblyName> <AssemblyName>DimensionLeaderEnd</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
@@ -92,4 +86,4 @@
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl" <PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl"
if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent> if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
@@ -30,7 +30,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -12,7 +12,7 @@
<AssemblyName>DisableCommand</AssemblyName> <AssemblyName>DisableCommand</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -12,7 +12,7 @@
<AssemblyName>DisplacementElementAnimation</AssemblyName> <AssemblyName>DisplacementElementAnimation</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -12,7 +12,7 @@
<AssemblyName>DockableDialogs</AssemblyName> <AssemblyName>DockableDialogs</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ChangesMonitor</RootNamespace> <RootNamespace>ChangesMonitor</RootNamespace>
<AssemblyName>ChangesMonitor</AssemblyName> <AssemblyName>ChangesMonitor</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
+1 -1
View File
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Revit.SDK.Samples.DoorSwing.CS</RootNamespace> <RootNamespace>Revit.SDK.Samples.DoorSwing.CS</RootNamespace>
<AssemblyName>DoorSwing</AssemblyName> <AssemblyName>DoorSwing</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -1,11 +1,5 @@
<?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"> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
None
</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -18,7 +12,7 @@
<AssemblyName>DuplicateGraphics</AssemblyName> <AssemblyName>DuplicateGraphics</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -73,4 +67,4 @@
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl" <PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl"
if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent> if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
@@ -12,7 +12,7 @@
<AssemblyName>DuplicateViews</AssemblyName> <AssemblyName>DuplicateViews</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Revit.SDK.Samples.DynamicModelUpdate.CS</RootNamespace> <RootNamespace>Revit.SDK.Samples.DynamicModelUpdate.CS</RootNamespace>
<AssemblyName>DynamicModelUpdate</AssemblyName> <AssemblyName>DynamicModelUpdate</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
@@ -18,7 +18,7 @@
</SccAuxPath> </SccAuxPath>
<SccProvider> <SccProvider>
</SccProvider> </SccProvider>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ErrorHandling</RootNamespace> <RootNamespace>ErrorHandling</RootNamespace>
<AssemblyName>ErrorHandling</AssemblyName> <AssemblyName>ErrorHandling</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -30,7 +30,7 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AutoUpdate</RootNamespace> <RootNamespace>AutoUpdate</RootNamespace>
<AssemblyName>AutoUpdate</AssemblyName> <AssemblyName>AutoUpdate</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CancelSave</RootNamespace> <RootNamespace>CancelSave</RootNamespace>
<AssemblyName>CancelSave</AssemblyName> <AssemblyName>CancelSave</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Revit.SDK.Samples.EventsMonitor.CS</RootNamespace> <RootNamespace>Revit.SDK.Samples.EventsMonitor.CS</RootNamespace>
<AssemblyName>EventsMonitor</AssemblyName> <AssemblyName>EventsMonitor</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -25,7 +25,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Revit.SDK.Samples.ProgressNotifier.CS</RootNamespace> <RootNamespace>Revit.SDK.Samples.ProgressNotifier.CS</RootNamespace>
<AssemblyName>ProgressNotifier</AssemblyName> <AssemblyName>ProgressNotifier</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ExtensibleStorageManager</RootNamespace> <RootNamespace>ExtensibleStorageManager</RootNamespace>
<AssemblyName>ExtensibleStorageManager</AssemblyName> <AssemblyName>ExtensibleStorageManager</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<FileUpgradeFlags> <FileUpgradeFlags>
</FileUpgradeFlags> </FileUpgradeFlags>
@@ -111,12 +111,12 @@ namespace ExtensibleStorageManager
private static void SimpleSchemaAndData(SchemaWrapperTools.SchemaWrapper mySchemaWrapper, out Entity storageElementEntityWrite) private static void SimpleSchemaAndData(SchemaWrapperTools.SchemaWrapper mySchemaWrapper, out Entity storageElementEntityWrite)
{ {
//Create some sample fields. //Create some sample fields.
mySchemaWrapper.AddField<int>(int0Name, UnitType.UT_Undefined, null); mySchemaWrapper.AddField<int>(int0Name, new ForgeTypeId(), null);
mySchemaWrapper.AddField<short>(short0Name, UnitType.UT_Undefined, null); mySchemaWrapper.AddField<short>(short0Name, new ForgeTypeId(), null);
mySchemaWrapper.AddField<double>(double0Name, UnitType.UT_Length, null); mySchemaWrapper.AddField<double>(double0Name, SpecTypeId.Length, null);
mySchemaWrapper.AddField<float>(float0Name, UnitType.UT_Length, null); mySchemaWrapper.AddField<float>(float0Name, SpecTypeId.Length, null);
mySchemaWrapper.AddField<bool>(bool0Name, UnitType.UT_Undefined, null); mySchemaWrapper.AddField<bool>(bool0Name, new ForgeTypeId(), null);
mySchemaWrapper.AddField<string>(string0Name, UnitType.UT_Undefined, null); mySchemaWrapper.AddField<string>(string0Name, new ForgeTypeId(), null);
//Generate the Autodesk.Revit.DB.ExtensibleStorage.Schema. //Generate the Autodesk.Revit.DB.ExtensibleStorage.Schema.
mySchemaWrapper.FinishSchema(); mySchemaWrapper.FinishSchema();
@@ -137,8 +137,8 @@ namespace ExtensibleStorageManager
//Set data in the entity. //Set data in the entity.
storageElementEntityWrite.Set<int>(fieldInt0, 5); storageElementEntityWrite.Set<int>(fieldInt0, 5);
storageElementEntityWrite.Set<short>(fieldShort0, 2); storageElementEntityWrite.Set<short>(fieldShort0, 2);
storageElementEntityWrite.Set<double>(fieldDouble0, 7.1, DisplayUnitType.DUT_METERS); storageElementEntityWrite.Set<double>(fieldDouble0, 7.1, UnitTypeId.Meters);
storageElementEntityWrite.Set<float>(fieldFloat0, 3.1f, DisplayUnitType.DUT_METERS); storageElementEntityWrite.Set<float>(fieldFloat0, 3.1f, UnitTypeId.Meters);
storageElementEntityWrite.Set(fieldBool0, false); storageElementEntityWrite.Set(fieldBool0, false);
storageElementEntityWrite.Set(fieldString0, "hello"); storageElementEntityWrite.Set(fieldString0, "hello");
@@ -152,35 +152,35 @@ namespace ExtensibleStorageManager
private static void ComplexSchemaAndData(SchemaWrapperTools.SchemaWrapper mySchemaWrapper, Element storageElement, string xmlPathOut, Guid schemaId, AccessLevel readAccess, AccessLevel writeAccess, string vendorId, string applicationId, string name, string documentation, out Entity storageElementEntityWrite) private static void ComplexSchemaAndData(SchemaWrapperTools.SchemaWrapper mySchemaWrapper, Element storageElement, string xmlPathOut, Guid schemaId, AccessLevel readAccess, AccessLevel writeAccess, string vendorId, string applicationId, string name, string documentation, out Entity storageElementEntityWrite)
{ {
#region Add Fields to the SchemaWrapper #region Add Fields to the SchemaWrapper
mySchemaWrapper.AddField<int>(int0Name, UnitType.UT_Undefined, null); mySchemaWrapper.AddField<int>(int0Name, new ForgeTypeId(), null);
mySchemaWrapper.AddField<short>(short0Name, UnitType.UT_Undefined, null); mySchemaWrapper.AddField<short>(short0Name, new ForgeTypeId(), null);
mySchemaWrapper.AddField<double>(double0Name, UnitType.UT_Length, null); mySchemaWrapper.AddField<double>(double0Name, SpecTypeId.Length, null);
mySchemaWrapper.AddField<float>(float0Name, UnitType.UT_Length, null); mySchemaWrapper.AddField<float>(float0Name, SpecTypeId.Length, null);
mySchemaWrapper.AddField<bool>(bool0Name, UnitType.UT_Undefined, null); mySchemaWrapper.AddField<bool>(bool0Name, new ForgeTypeId(), null);
mySchemaWrapper.AddField<string>(string0Name, UnitType.UT_Undefined, null); mySchemaWrapper.AddField<string>(string0Name, new ForgeTypeId(), null);
mySchemaWrapper.AddField<ElementId>(id0Name, UnitType.UT_Undefined, null); mySchemaWrapper.AddField<ElementId>(id0Name, new ForgeTypeId(), null);
mySchemaWrapper.AddField<XYZ>(point0Name, UnitType.UT_Length, null); mySchemaWrapper.AddField<XYZ>(point0Name, SpecTypeId.Length, null);
mySchemaWrapper.AddField<UV>(uv0Name, UnitType.UT_Length, null); mySchemaWrapper.AddField<UV>(uv0Name, SpecTypeId.Length, null);
mySchemaWrapper.AddField<Guid>(guid0Name, UnitType.UT_Undefined, null); mySchemaWrapper.AddField<Guid>(guid0Name, new ForgeTypeId(), null);
//Note that we use IDictionary<> for map types and IList<> for array types //Note that we use IDictionary<> for map types and IList<> for array types
mySchemaWrapper.AddField<IDictionary<string, string>>(map0Name, UnitType.UT_Undefined, null); mySchemaWrapper.AddField<IDictionary<string, string>>(map0Name, new ForgeTypeId(), null);
mySchemaWrapper.AddField<IList<bool>>(array0Name, UnitType.UT_Undefined, null); mySchemaWrapper.AddField<IList<bool>>(array0Name, new ForgeTypeId(), null);
//Create a sample subEntity //Create a sample subEntity
SchemaWrapperTools.SchemaWrapper mySubSchemaWrapper0 = SchemaWrapperTools.SchemaWrapper.NewSchema(subEntityGuid0, readAccess, writeAccess, vendorId, applicationId, entity0Name, "A sub entity"); SchemaWrapperTools.SchemaWrapper mySubSchemaWrapper0 = SchemaWrapperTools.SchemaWrapper.NewSchema(subEntityGuid0, readAccess, writeAccess, vendorId, applicationId, entity0Name, "A sub entity");
mySubSchemaWrapper0.AddField<int>("subInt0", UnitType.UT_Undefined, null); mySubSchemaWrapper0.AddField<int>("subInt0", new ForgeTypeId(), null);
mySubSchemaWrapper0.FinishSchema(); mySubSchemaWrapper0.FinishSchema();
Entity subEnt0 = new Entity(mySubSchemaWrapper0.GetSchema()); Entity subEnt0 = new Entity(mySubSchemaWrapper0.GetSchema());
subEnt0.Set<int>(mySubSchemaWrapper0.GetSchema().GetField("subInt0"), 11); subEnt0.Set<int>(mySubSchemaWrapper0.GetSchema().GetField("subInt0"), 11);
mySchemaWrapper.AddField<Entity>(entity0Name, UnitType.UT_Undefined, mySubSchemaWrapper0); mySchemaWrapper.AddField<Entity>(entity0Name, new ForgeTypeId(), mySubSchemaWrapper0);
// //
//Create a sample map of subEntities (An IDictionary<> with key type "int" and value type "Entity") //Create a sample map of subEntities (An IDictionary<> with key type "int" and value type "Entity")
// //
//Create a new sample schema. //Create a new sample schema.
SchemaWrapperTools.SchemaWrapper mySubSchemaWrapper1_Map = SchemaWrapperTools.SchemaWrapper.NewSchema(subEntityGuid_Map1, readAccess, writeAccess, vendorId, applicationId, map1Name, "A map of int to Entity"); SchemaWrapperTools.SchemaWrapper mySubSchemaWrapper1_Map = SchemaWrapperTools.SchemaWrapper.NewSchema(subEntityGuid_Map1, readAccess, writeAccess, vendorId, applicationId, map1Name, "A map of int to Entity");
mySubSchemaWrapper1_Map.AddField<int>("subInt1", UnitType.UT_Undefined, null); mySubSchemaWrapper1_Map.AddField<int>("subInt1", new ForgeTypeId(), null);
mySubSchemaWrapper1_Map.FinishSchema(); mySubSchemaWrapper1_Map.FinishSchema();
//Create a new sample Entity. //Create a new sample Entity.
Entity subEnt1 = new Entity(mySubSchemaWrapper1_Map.GetSchema()); Entity subEnt1 = new Entity(mySubSchemaWrapper1_Map.GetSchema());
@@ -188,7 +188,7 @@ namespace ExtensibleStorageManager
subEnt1.Set<int>(mySubSchemaWrapper1_Map.GetSchema().GetField("subInt1"), 22); subEnt1.Set<int>(mySubSchemaWrapper1_Map.GetSchema().GetField("subInt1"), 22);
//Add a new map field to the top-level Schema. We will add the entity we just created after all top-level //Add a new map field to the top-level Schema. We will add the entity we just created after all top-level
//fields are created. //fields are created.
mySchemaWrapper.AddField<IDictionary<int, Entity>>(map1Name, UnitType.UT_Undefined, mySubSchemaWrapper1_Map); mySchemaWrapper.AddField<IDictionary<int, Entity>>(map1Name, new ForgeTypeId(), mySubSchemaWrapper1_Map);
@@ -198,7 +198,7 @@ namespace ExtensibleStorageManager
// //
//Create a new sample schema //Create a new sample schema
SchemaWrapperTools.SchemaWrapper mySubSchemaWrapper2_Array = SchemaWrapperTools.SchemaWrapper.NewSchema(subEntityGuid_Array2, readAccess, writeAccess, vendorId, applicationId, array1Name, "An array of Entities"); SchemaWrapperTools.SchemaWrapper mySubSchemaWrapper2_Array = SchemaWrapperTools.SchemaWrapper.NewSchema(subEntityGuid_Array2, readAccess, writeAccess, vendorId, applicationId, array1Name, "An array of Entities");
mySubSchemaWrapper2_Array.AddField<int>("subInt2", UnitType.UT_Undefined, null); mySubSchemaWrapper2_Array.AddField<int>("subInt2", new ForgeTypeId(), null);
mySubSchemaWrapper2_Array.FinishSchema(); mySubSchemaWrapper2_Array.FinishSchema();
//Create a new sample Entity. //Create a new sample Entity.
Entity subEnt2 = new Entity(mySubSchemaWrapper2_Array.GetSchema()); Entity subEnt2 = new Entity(mySubSchemaWrapper2_Array.GetSchema());
@@ -206,7 +206,7 @@ namespace ExtensibleStorageManager
subEnt2.Set<int>(mySubSchemaWrapper2_Array.GetSchema().GetField("subInt2"), 33); subEnt2.Set<int>(mySubSchemaWrapper2_Array.GetSchema().GetField("subInt2"), 33);
//Add a new array field to the top-level Schema We will add the entity we just crated after all top-level fields //Add a new array field to the top-level Schema We will add the entity we just crated after all top-level fields
//are created. //are created.
mySchemaWrapper.AddField<IList<Entity>>(array1Name, UnitType.UT_Undefined, mySubSchemaWrapper2_Array); mySchemaWrapper.AddField<IList<Entity>>(array1Name, new ForgeTypeId(), mySubSchemaWrapper2_Array);
#endregion #endregion
@@ -251,15 +251,15 @@ namespace ExtensibleStorageManager
storageElementEntityWrite.Set<int>(fieldInt0, 5); storageElementEntityWrite.Set<int>(fieldInt0, 5);
storageElementEntityWrite.Set<short>(fieldShort0, 2); storageElementEntityWrite.Set<short>(fieldShort0, 2);
storageElementEntityWrite.Set<double>(fieldDouble0, 7.1, DisplayUnitType.DUT_METERS); storageElementEntityWrite.Set<double>(fieldDouble0, 7.1, UnitTypeId.Meters);
storageElementEntityWrite.Set<float>(fieldFloat0, 3.1f, DisplayUnitType.DUT_METERS); storageElementEntityWrite.Set<float>(fieldFloat0, 3.1f, UnitTypeId.Meters);
storageElementEntityWrite.Set(fieldBool0, false); storageElementEntityWrite.Set(fieldBool0, false);
storageElementEntityWrite.Set(fieldString0, "hello"); storageElementEntityWrite.Set(fieldString0, "hello");
storageElementEntityWrite.Set(fieldId0, storageElement.Id); storageElementEntityWrite.Set(fieldId0, storageElement.Id);
storageElementEntityWrite.Set(fieldPoint0, new XYZ(1, 2, 3), DisplayUnitType.DUT_METERS); storageElementEntityWrite.Set(fieldPoint0, new XYZ(1, 2, 3), UnitTypeId.Meters);
storageElementEntityWrite.Set(fieldUv0, new UV(1, 2), DisplayUnitType.DUT_METERS); storageElementEntityWrite.Set(fieldUv0, new UV(1, 2), UnitTypeId.Meters);
storageElementEntityWrite.Set(fieldGuid0, new Guid("D8301329-F207-43B8-8AA1-634FD344F350")); storageElementEntityWrite.Set(fieldGuid0, new Guid("D8301329-F207-43B8-8AA1-634FD344F350"));
//Note that we must pass an IDictionary<>, not a Dictionary<> to Set(). //Note that we must pass an IDictionary<>, not a Dictionary<> to Set().
@@ -361,8 +361,8 @@ namespace ExtensibleStorageManager
storageElementEntityWrite.Set<int>(fieldInt0, 10); storageElementEntityWrite.Set<int>(fieldInt0, 10);
storageElementEntityWrite.Set<short>(fieldShort0, 20); storageElementEntityWrite.Set<short>(fieldShort0, 20);
storageElementEntityWrite.Set<double>(fieldDouble0, 14.2, DisplayUnitType.DUT_METERS); storageElementEntityWrite.Set<double>(fieldDouble0, 14.2, UnitTypeId.Meters);
storageElementEntityWrite.Set<float>(fieldFloat0, 6.12f, DisplayUnitType.DUT_METERS); storageElementEntityWrite.Set<float>(fieldFloat0, 6.12f, UnitTypeId.Meters);
storageElementEntityWrite.Set(fieldBool0, true); storageElementEntityWrite.Set(fieldBool0, true);
storageElementEntityWrite.Set(fieldString0, "goodbye"); storageElementEntityWrite.Set(fieldString0, "goodbye");
//Set the entity back into the storage element. //Set the entity back into the storage element.
@@ -52,8 +52,8 @@ namespace SchemaWrapperTools
/// </summary> /// </summary>
/// <param name="name">The name of the field</param> /// <param name="name">The name of the field</param>
/// <param name="typeIn">The AssemblyQualifiedName of the Field's data type</param> /// <param name="typeIn">The AssemblyQualifiedName of the Field's data type</param>
/// <param name="unit">The unit type of the Field (set to UT_Undefined for non-floating point types</param> /// <param name="spec">The unit type of the Field (set to UT_Undefined for non-floating point types</param>
public FieldData(string name, string typeIn, UnitType unit) : this(name, typeIn, unit, null) public FieldData(string name, string typeIn, ForgeTypeId spec) : this(name, typeIn, spec, null)
{ {
} }
@@ -63,13 +63,13 @@ namespace SchemaWrapperTools
/// </summary> /// </summary>
/// <param name="name">The name of the field</param> /// <param name="name">The name of the field</param>
/// <param name="typeIn">The AssemblyQualifiedName of the Field's data type</param> /// <param name="typeIn">The AssemblyQualifiedName of the Field's data type</param>
/// <param name="unit">The unit type of the Field (set to UT_Undefined for non-floating point types</param> /// <param name="spec">The unit type of the Field (set to UT_Undefined for non-floating point types</param>
/// <param name="subSchema">The SchemaWrapper of the field's subSchema, if the field is of type "Entity"</param> /// <param name="subSchema">The SchemaWrapper of the field's subSchema, if the field is of type "Entity"</param>
public FieldData(string name, string typeIn, UnitType unit, SchemaWrapper subSchema) public FieldData(string name, string typeIn, ForgeTypeId spec, SchemaWrapper subSchema)
{ {
m_Name = name; m_Name = name;
m_Type = typeIn; m_Type = typeIn;
m_Unit = unit; m_Spec = spec;
m_SubSchema = subSchema; m_SubSchema = subSchema;
} }
#endregion #endregion
@@ -83,7 +83,7 @@ namespace SchemaWrapperTools
strBuilder.Append(", "); strBuilder.Append(", ");
strBuilder.Append(Type); strBuilder.Append(Type);
strBuilder.Append(", "); strBuilder.Append(", ");
strBuilder.Append(Unit.ToString()); strBuilder.Append(Spec.TypeId);
if (SubSchema != null) if (SubSchema != null)
@@ -116,10 +116,10 @@ namespace SchemaWrapperTools
/// <summary> /// <summary>
/// The Unit type of the field /// The Unit type of the field
/// </summary> /// </summary>
public UnitType Unit public ForgeTypeId Spec
{ {
get { return m_Unit; } get { return m_Spec; }
set { m_Unit = value; } set { m_Spec = value; }
} }
/// <summary> /// <summary>
@@ -136,7 +136,7 @@ namespace SchemaWrapperTools
private SchemaWrapper m_SubSchema; private SchemaWrapper m_SubSchema;
private string m_Name; private string m_Name;
private string m_Type; private string m_Type;
private UnitType m_Unit; private ForgeTypeId m_Spec;
#endregion #endregion
} }
@@ -76,11 +76,11 @@ namespace SchemaWrapperTools
/// </summary> /// </summary>
/// <param name="name">the name of the field</param> /// <param name="name">the name of the field</param>
/// <param name="typeIn">the data type of the field</param> /// <param name="typeIn">the data type of the field</param>
/// <param name="unit">The unit type of the Field (set to UT_Undefined for non-floating point types</param> /// <param name="spec">The unit type of the Field (set to UT_Undefined for non-floating point types</param>
/// <param name="subSchema">The SchemaWrapper of the field's subSchema, if the field is of type "Entity"</param> /// <param name="subSchema">The SchemaWrapper of the field's subSchema, if the field is of type "Entity"</param>
public void AddData(string name, System.Type typeIn, UnitType unit, SchemaWrapper subSchema) public void AddData(string name, System.Type typeIn, ForgeTypeId spec, SchemaWrapper subSchema)
{ {
m_DataList.Add(new FieldData(name, typeIn.FullName, unit, subSchema)); m_DataList.Add(new FieldData(name, typeIn.FullName, spec, subSchema));
} }
#endregion #endregion
@@ -65,7 +65,7 @@ namespace SchemaWrapperTools
//then query the field data types from the field and instantiate a new generic method with those types as parameters. //then query the field data types from the field and instantiate a new generic method with those types as parameters.
//Get the "AddField" method. //Get the "AddField" method.
MethodInfo addFieldmethod = typeof(SchemaWrapper).GetMethod("AddField", new Type[] { typeof(string), typeof(UnitType), typeof(SchemaWrapper) }); MethodInfo addFieldmethod = typeof(SchemaWrapper).GetMethod("AddField", new Type[] { typeof(string), typeof(ForgeTypeId), typeof(SchemaWrapper) });
Type[] methodGenericParameters = null; Type[] methodGenericParameters = null;
//Get the generic type parameters. The type will either be a single type, an IList<> of a single type, or an IDictionary<> of a key type and a value type. //Get the generic type parameters. The type will either be a single type, an IList<> of a single type, or an IDictionary<> of a key type and a value type.
@@ -87,7 +87,7 @@ namespace SchemaWrapperTools
swSub = SchemaWrapper.FromSchema(subSchema); swSub = SchemaWrapper.FromSchema(subSchema);
} }
//Invoke the "AddField" method with the generic parameters from the current field. //Invoke the "AddField" method with the generic parameters from the current field.
genericAddFieldMethodInstantiated.Invoke(swReturn, new object[] { currentField.FieldName, currentField.UnitType, swSub }); genericAddFieldMethodInstantiated.Invoke(swReturn, new object[] { currentField.FieldName, currentField.GetSpecTypeId(), swSub });
} }
//Note that we don't call SchemaWrapper.FinishSchema here. //Note that we don't call SchemaWrapper.FinishSchema here.
//The Autodesk.Revit.DB.ExtensibleStorage.Schema object already exists and is registered -- we're just populating the outer wrapper. //The Autodesk.Revit.DB.ExtensibleStorage.Schema object already exists and is registered -- we're just populating the outer wrapper.
@@ -161,11 +161,11 @@ namespace SchemaWrapperTools
/// </summary> /// </summary>
/// <typeparam name="TypeName">Currently supported types: int, short, float, double, bool, string, ElementId, XYZ, UV, Guid, Entity, IDictionary<>, IList<>. IDictionary<> does not support floating point types, XYZ, UV, or Entity as Key parameters.</typeparam> /// <typeparam name="TypeName">Currently supported types: int, short, float, double, bool, string, ElementId, XYZ, UV, Guid, Entity, IDictionary<>, IList<>. IDictionary<> does not support floating point types, XYZ, UV, or Entity as Key parameters.</typeparam>
/// <param name="name">The name of the field</param> /// <param name="name">The name of the field</param>
/// <param name="unit">The unit type of the field. Defintion required for floating point, XYZ, and UV types</param> /// <param name="spec">The unit type of the field. Defintion required for floating point, XYZ, and UV types</param>
/// <param name="subSchema">A subSchemaWrapper, if the field is of type Entity</param> /// <param name="subSchema">A subSchemaWrapper, if the field is of type Entity</param>
public void AddField<TypeName>(string name, UnitType unit, SchemaWrapper subSchema) public void AddField<TypeName>(string name, ForgeTypeId spec, SchemaWrapper subSchema)
{ {
m_SchemaDataWrapper.AddData(name, typeof(TypeName), unit, subSchema); m_SchemaDataWrapper.AddData(name, typeof(TypeName), spec, subSchema);
} }
/// <summary> /// <summary>
@@ -254,8 +254,8 @@ namespace SchemaWrapperTools
currentFieldData.SubSchema.FinishSchema(); //Recursively create the schema for the subSchema. currentFieldData.SubSchema.FinishSchema(); //Recursively create the schema for the subSchema.
} }
if (currentFieldData.Unit != UnitType.UT_Undefined) if (!currentFieldData.Spec.Empty())
currentFieldBuilder.SetUnitType(currentFieldData.Unit); currentFieldBuilder.SetSpec(currentFieldData.Spec);
} }
//Set all the top level data in the schema we are generating. //Set all the top level data in the schema we are generating.
@@ -373,7 +373,7 @@ namespace SchemaWrapperTools
{ {
string fieldName = field.FieldName; string fieldName = field.FieldName;
System.Type fieldType = field.ValueType; System.Type fieldType = field.ValueType;
UnitType fieldUnit = field.UnitType; ForgeTypeId fieldUnit = field.GetSpecTypeId();
ContainerType fieldContainerType = field.ContainerType; ContainerType fieldContainerType = field.ContainerType;
Type[] methodGenericParameters = null; Type[] methodGenericParameters = null;
object[] invokeParams = null; object[] invokeParams = null;
@@ -385,15 +385,15 @@ namespace SchemaWrapperTools
else //map else //map
methodGenericParameters = new Type[] { typeof(IDictionary<int, int>).GetGenericTypeDefinition().MakeGenericType(new Type[] { field.KeyType, field.ValueType }) }; methodGenericParameters = new Type[] { typeof(IDictionary<int, int>).GetGenericTypeDefinition().MakeGenericType(new Type[] { field.KeyType, field.ValueType }) };
if (fieldUnit == UnitType.UT_Undefined) if (fieldUnit.Empty())
{ {
methodOverloadSelectionParams = new Type[] { typeof(Field) }; methodOverloadSelectionParams = new Type[] { typeof(Field) };
invokeParams = new object[] { field }; invokeParams = new object[] { field };
} }
else else
{ {
methodOverloadSelectionParams = new Type[] { typeof(Field), typeof(DisplayUnitType) }; methodOverloadSelectionParams = new Type[] { typeof(Field), typeof(ForgeTypeId) };
invokeParams = new object[] { field, DisplayUnitType.DUT_METERS }; invokeParams = new object[] { field, UnitTypeId.Meters };
} }
MethodInfo instantiatedGenericGetMethod = entity.GetType().GetMethod("Get", methodOverloadSelectionParams).MakeGenericMethod(methodGenericParameters); MethodInfo instantiatedGenericGetMethod = entity.GetType().GetMethod("Get", methodOverloadSelectionParams).MakeGenericMethod(methodGenericParameters);
@@ -403,13 +403,13 @@ namespace SchemaWrapperTools
if (fieldType == typeof(Entity)) if (fieldType == typeof(Entity))
{ {
Schema subSchema = Schema.Lookup(field.SubSchemaGUID); Schema subSchema = Schema.Lookup(field.SubSchemaGUID);
strBuilder.AppendLine("Field: " + field.FieldName + ", Type: " + field.ValueType.ToString() + ", Value: " + " {SubEntity} " + ", Unit: " + field.UnitType.ToString() + ", ContainerType: " + field.ContainerType.ToString()); strBuilder.AppendLine("Field: " + field.FieldName + ", Type: " + field.ValueType.ToString() + ", Value: " + " {SubEntity} " + ", Unit: " + field.GetSpecTypeId().TypeId + ", ContainerType: " + field.ContainerType.ToString());
DumpAllSchemaEntityData<FieldType>(retval, subSchema, strBuilder); DumpAllSchemaEntityData<FieldType>(retval, subSchema, strBuilder);
} }
else else
{ {
string sRetval = retval.ToString(); string sRetval = retval.ToString();
strBuilder.AppendLine("Field: " + field.FieldName + ", Type: " + field.ValueType.ToString() + ", Value: " + retval + ", Unit: " + field.UnitType.ToString() + ", ContainerType: " + field.ContainerType.ToString()); strBuilder.AppendLine("Field: " + field.FieldName + ", Type: " + field.ValueType.ToString() + ", Value: " + retval + ", Unit: " + field.GetSpecTypeId().TypeId + ", ContainerType: " + field.ContainerType.ToString());
} }
} }
else if (field.ContainerType == ContainerType.Array) else if (field.ContainerType == ContainerType.Array)
@@ -417,7 +417,7 @@ namespace SchemaWrapperTools
IList<FieldType> listRetval = (IList<FieldType>)instantiatedGenericGetMethod.Invoke(entity, invokeParams); IList<FieldType> listRetval = (IList<FieldType>)instantiatedGenericGetMethod.Invoke(entity, invokeParams);
if (fieldType == (typeof(Entity))) if (fieldType == (typeof(Entity)))
{ {
strBuilder.AppendLine("Field: " + field.FieldName + ", Type: " + field.ValueType.ToString() + ", Value: " + " {SubEntity} " + ", Unit: " + field.UnitType.ToString() + ", ContainerType: " + field.ContainerType.ToString()); strBuilder.AppendLine("Field: " + field.FieldName + ", Type: " + field.ValueType.ToString() + ", Value: " + " {SubEntity} " + ", Unit: " + field.GetSpecTypeId().TypeId + ", ContainerType: " + field.ContainerType.ToString());
foreach (FieldType fa in listRetval) foreach (FieldType fa in listRetval)
{ {
@@ -427,7 +427,7 @@ namespace SchemaWrapperTools
} }
else else
{ {
strBuilder.AppendLine("Field: " + field.FieldName + ", Type: " + field.ValueType.ToString() + ", Value: " + " {Array} " + ", Unit: " + field.UnitType.ToString() + ", ContainerType: " + field.ContainerType.ToString()); strBuilder.AppendLine("Field: " + field.FieldName + ", Type: " + field.ValueType.ToString() + ", Value: " + " {Array} " + ", Unit: " + field.GetSpecTypeId().TypeId + ", ContainerType: " + field.ContainerType.ToString());
foreach (FieldType fa in listRetval) foreach (FieldType fa in listRetval)
{ {
strBuilder.AppendLine(" Array value: " + fa.ToString()); strBuilder.AppendLine(" Array value: " + fa.ToString());
@@ -436,11 +436,11 @@ namespace SchemaWrapperTools
} }
else //Map else //Map
{ {
strBuilder.AppendLine("Field: " + field.FieldName + ", Type: " + field.ValueType.ToString() + ", Value: " + " {Map} " + ", Unit: " + field.UnitType.ToString() + ", ContainerType: " + field.ContainerType.ToString()); strBuilder.AppendLine("Field: " + field.FieldName + ", Type: " + field.ValueType.ToString() + ", Value: " + " {Map} " + ", Unit: " + field.GetSpecTypeId().TypeId + ", ContainerType: " + field.ContainerType.ToString());
IDictionary<KeyType, FieldType> mapRetval = (IDictionary<KeyType, FieldType>)instantiatedGenericGetMethod.Invoke(entity, invokeParams); IDictionary<KeyType, FieldType> mapRetval = (IDictionary<KeyType, FieldType>)instantiatedGenericGetMethod.Invoke(entity, invokeParams);
if (fieldType == (typeof(Entity))) if (fieldType == (typeof(Entity)))
{ {
strBuilder.AppendLine("Field: " + field.FieldName + ", Type: " + field.ValueType.ToString() + ", Value: " + " {SubEntity} " + ", Unit: " + field.UnitType.ToString() + ", ContainerType: " + field.ContainerType.ToString()); strBuilder.AppendLine("Field: " + field.FieldName + ", Type: " + field.ValueType.ToString() + ", Value: " + " {SubEntity} " + ", Unit: " + field.GetSpecTypeId().TypeId + ", ContainerType: " + field.ContainerType.ToString());
foreach (FieldType fa in mapRetval.Values) foreach (FieldType fa in mapRetval.Values)
{ {
strBuilder.Append(" Map Value: "); strBuilder.Append(" Map Value: ");
@@ -449,7 +449,7 @@ namespace SchemaWrapperTools
} }
else else
{ {
strBuilder.AppendLine("Field: " + field.FieldName + ", Type: " + field.ValueType.ToString() + ", Value: " + " {Map} " + ", Unit: " + field.UnitType.ToString() + ", ContainerType: " + field.ContainerType.ToString()); strBuilder.AppendLine("Field: " + field.FieldName + ", Type: " + field.ValueType.ToString() + ", Value: " + " {Map} " + ", Unit: " + field.GetSpecTypeId().TypeId + ", ContainerType: " + field.ContainerType.ToString());
foreach (FieldType fa in mapRetval.Values) foreach (FieldType fa in mapRetval.Values)
{ {
strBuilder.AppendLine(" Map value: " + fa.ToString()); strBuilder.AppendLine(" Map value: " + fa.ToString());
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SchemaWrapperTools</RootNamespace> <RootNamespace>SchemaWrapperTools</RootNamespace>
<AssemblyName>SchemaWrapperTools</AssemblyName> <AssemblyName>SchemaWrapperTools</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
@@ -54,7 +54,7 @@ namespace Revit.SDK.Samples.ExtensibleStorageUtility.CS
foreach (Schema schema in schemas) foreach (Schema schema in schemas)
{ {
//Note-this will delete storage of this schema in *all* open documents. //Note-this will delete storage of this schema in *all* open documents.
Schema.EraseSchemaAndAllEntities(schema, true); document.EraseSchemaAndAllEntities(schema);
} }
tErase.Commit(); tErase.Commit();
message = "All storage was deleted."; message = "All storage was deleted.";
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ExtensibleStorageUtility</RootNamespace> <RootNamespace>ExtensibleStorageUtility</RootNamespace>
<AssemblyName>ExtensibleStorageUtility</AssemblyName> <AssemblyName>ExtensibleStorageUtility</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ExternalCommandRegistration</RootNamespace> <RootNamespace>ExternalCommandRegistration</RootNamespace>
<AssemblyName>ExternalCommandRegistration</AssemblyName> <AssemblyName>ExternalCommandRegistration</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RevitAddInUtilitySample</RootNamespace> <RootNamespace>RevitAddInUtilitySample</RootNamespace>
<AssemblyName>RevitAddInUtilitySample</AssemblyName> <AssemblyName>RevitAddInUtilitySample</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
<Install>true</Install> <Install>true</Install>
@@ -12,7 +12,7 @@
<AssemblyName>ExternalResourceDBServer</AssemblyName> <AssemblyName>ExternalResourceDBServer</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -12,7 +12,7 @@
<AssemblyName>ExternalResourceUIServer</AssemblyName> <AssemblyName>ExternalResourceUIServer</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
None
</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -18,7 +12,7 @@
<AssemblyName>FabricationPartLayout</AssemblyName> <AssemblyName>FabricationPartLayout</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -109,4 +103,4 @@
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl" <PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl"
if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent> if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
@@ -139,7 +139,7 @@ namespace Revit.SDK.Samples.FabricationPartLayout.CS
builder.AppendLine("Specification: " + spec); builder.AppendLine("Specification: " + spec);
// centerline length // centerline length
builder.AppendLine("Centerline Length: " + GetStringFromNumber(doc, part.CenterlineLength, UnitType.UT_Length)); builder.AppendLine("Centerline Length: " + GetStringFromNumber(doc, part.CenterlineLength, SpecTypeId.Length));
TaskDialog.Show("Fabrication Part [" + part.Id.IntegerValue + "]", builder.ToString()); TaskDialog.Show("Fabrication Part [" + part.Id.IntegerValue + "]", builder.ToString());
@@ -152,9 +152,9 @@ namespace Revit.SDK.Samples.FabricationPartLayout.CS
} }
} }
private string GetStringFromNumber(Document doc, double number, UnitType unitType) private string GetStringFromNumber(Document doc, double number, ForgeTypeId specTypeId)
{ {
return UnitFormatUtils.Format(doc.GetUnits(), unitType, number, true, false); return UnitFormatUtils.Format(doc.GetUnits(), specTypeId, number, false);
} }
} }
} }
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AutoJoin</RootNamespace> <RootNamespace>AutoJoin</RootNamespace>
<AssemblyName>AutoJoin</AssemblyName> <AssemblyName>AutoJoin</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AutoParameter</RootNamespace> <RootNamespace>AutoParameter</RootNamespace>
<AssemblyName>AutoParameter</AssemblyName> <AssemblyName>AutoParameter</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -11,7 +11,7 @@
<RootNamespace>CreateAirHandler</RootNamespace> <RootNamespace>CreateAirHandler</RootNamespace>
<AssemblyName>CreateAirHandler</AssemblyName> <AssemblyName>CreateAirHandler</AssemblyName>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -34,7 +34,7 @@
</StartupObject> </StartupObject>
<TargetFrameworkSubset> <TargetFrameworkSubset>
</TargetFrameworkSubset> </TargetFrameworkSubset>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Revit.SDK.Samples.ImportExport.CS</RootNamespace> <RootNamespace>Revit.SDK.Samples.ImportExport.CS</RootNamespace>
<AssemblyName>DWGFamilyCreation</AssemblyName> <AssemblyName>DWGFamilyCreation</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -30,7 +30,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -11,7 +11,7 @@
<RootNamespace>TypeRegeneration</RootNamespace> <RootNamespace>TypeRegeneration</RootNamespace>
<AssemblyName>TypeRegeneration</AssemblyName> <AssemblyName>TypeRegeneration</AssemblyName>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -11,7 +11,7 @@
<RootNamespace>ValidateParameters</RootNamespace> <RootNamespace>ValidateParameters</RootNamespace>
<AssemblyName>ValidateParameters</AssemblyName> <AssemblyName>ValidateParameters</AssemblyName>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -13,7 +13,7 @@
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkSubset> <TargetFrameworkSubset>
</TargetFrameworkSubset> </TargetFrameworkSubset>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -12,7 +12,7 @@
<AssemblyName>FamilyParametersOrder</AssemblyName> <AssemblyName>FamilyParametersOrder</AssemblyName>
<StartupObject> <StartupObject>
</StartupObject> </StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

Some files were not shown because too many files have changed in this diff Show More