mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-08-20 20:22:03 +00:00
replaced Revit 2020 SDK by Revit 2021 SDK
This commit is contained in:
@@ -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">
|
||||
<PropertyGroup>
|
||||
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
|
||||
None
|
||||
</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
@@ -18,7 +12,7 @@
|
||||
<AssemblyName>FabricationPartLayout</AssemblyName>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
@@ -109,4 +103,4 @@
|
||||
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl"
|
||||
if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -139,7 +139,7 @@ namespace Revit.SDK.Samples.FabricationPartLayout.CS
|
||||
builder.AppendLine("Specification: " + spec);
|
||||
|
||||
// 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());
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user