Skip to content

Commit 32b6afd

Browse files
authored
Merge pull request #38 from TonyHuangYJ/master
Adding Sketchup 2021 support
2 parents 4579c6c + af16584 commit 32b6afd

13 files changed

Lines changed: 169 additions & 13 deletions

File tree

API/SketchUpAPI.dll

159 KB
Binary file not shown.

API/SketchUpAPI.lib

8.87 KB
Binary file not shown.

API/SketchUpAPI/model/model.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ enum SUModelVersion {
7979
SUModelVersion_SU2017,
8080
SUModelVersion_SU2018,
8181
SUModelVersion_SU2019,
82-
SUModelVersion_SU2020
82+
SUModelVersion_SU2020,
83+
SUModelVersion_SU2021
8384
};
8485

8586
/**

API/SketchUpCommonPreferences.dll

15.5 KB
Binary file not shown.

API/sketchup.lib

12.6 KB
Binary file not shown.

SketchUpForDynamo/SketchUp.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static class SketchUp
4242
public static bool ReformatModel(string filepath, string version, string newfilepath)
4343
{
4444
SketchUpNET.SketchUp skp = new SketchUpNET.SketchUp();
45-
SKPVersion v = SKPVersion.V2020;
45+
SKPVersion v = SKPVersion.V2021;
4646
switch (version)
4747
{
4848
case "2014": v = SKPVersion.V2014; break;
@@ -52,6 +52,7 @@ public static bool ReformatModel(string filepath, string version, string newfile
5252
case "2018": v = SKPVersion.V2018; break;
5353
case "2019": v = SKPVersion.V2019; break;
5454
case "2020": v = SKPVersion.V2020; break;
55+
case "2021": v = SKPVersion.V2021; break;
5556
}
5657
return skp.SaveAs(filepath, v, newfilepath);
5758
}

SketchUpNET.sln

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.27428.2043
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.31424.327
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SketchUpForDynamo", "SketchUpForDynamo\SketchUpForDynamo.csproj", "{60201034-7CD1-4217-82BB-1161D8D0BB0A}"
77
EndProject
@@ -61,8 +61,8 @@ Global
6161
{942583E2-369B-4A00-8E34-F22073A911B2}.Release|x64.ActiveCfg = Release|Any CPU
6262
{1C4D4501-EB39-45C8-BED0-609A978E823F}.Debug|Any CPU.ActiveCfg = Debug|Win32
6363
{1C4D4501-EB39-45C8-BED0-609A978E823F}.Debug|ARM.ActiveCfg = Debug|Win32
64-
{1C4D4501-EB39-45C8-BED0-609A978E823F}.Debug|Mixed Platforms.ActiveCfg = Release|x64
65-
{1C4D4501-EB39-45C8-BED0-609A978E823F}.Debug|Mixed Platforms.Build.0 = Release|x64
64+
{1C4D4501-EB39-45C8-BED0-609A978E823F}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
65+
{1C4D4501-EB39-45C8-BED0-609A978E823F}.Debug|Mixed Platforms.Build.0 = Debug|x64
6666
{1C4D4501-EB39-45C8-BED0-609A978E823F}.Debug|Win32.ActiveCfg = Debug|Win32
6767
{1C4D4501-EB39-45C8-BED0-609A978E823F}.Debug|Win32.Build.0 = Debug|Win32
6868
{1C4D4501-EB39-45C8-BED0-609A978E823F}.Debug|x64.ActiveCfg = Debug|x64

SketchUpNET/SketchUpNET.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ namespace SketchUpNET
5656
V2017,
5757
V2018,
5858
V2019,
59-
V2020
59+
V2020,
60+
V2021
6061
};
6162

6263
/// <summary>
@@ -283,6 +284,9 @@ namespace SketchUpNET
283284
case SketchUpNET::SKPVersion::V2020:
284285
saveversion = SUModelVersion::SUModelVersion_SU2020;
285286
break;
287+
case SketchUpNET::SKPVersion::V2021:
288+
saveversion = SUModelVersion::SUModelVersion_SU2021;
289+
break;
286290
default:
287291
break;
288292
}

SketchUpNET/SketchUpNET.vcxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<ProjectGuid>{1C4D4501-EB39-45C8-BED0-609A978E823F}</ProjectGuid>
2323
<RootNamespace>SketchUpNET</RootNamespace>
2424
<ProjectName>SketchUpNET</ProjectName>
25-
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
25+
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
2626
</PropertyGroup>
2727
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2828
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -35,7 +35,7 @@
3535
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
3636
<ConfigurationType>DynamicLibrary</ConfigurationType>
3737
<UseDebugLibraries>true</UseDebugLibraries>
38-
<PlatformToolset>v140</PlatformToolset>
38+
<PlatformToolset>v142</PlatformToolset>
3939
<CharacterSet>Unicode</CharacterSet>
4040
<CLRSupport>true</CLRSupport>
4141
</PropertyGroup>
@@ -49,7 +49,7 @@
4949
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
5050
<ConfigurationType>DynamicLibrary</ConfigurationType>
5151
<UseDebugLibraries>false</UseDebugLibraries>
52-
<PlatformToolset>v141</PlatformToolset>
52+
<PlatformToolset>v142</PlatformToolset>
5353
<WholeProgramOptimization>true</WholeProgramOptimization>
5454
<CharacterSet>Unicode</CharacterSet>
5555
<CLRSupport>Safe</CLRSupport>
@@ -100,7 +100,7 @@
100100
<Link>
101101
<GenerateDebugInformation>true</GenerateDebugInformation>
102102
<AdditionalLibraryDirectories>..\API;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
103-
<AdditionalDependencies>slapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
103+
<AdditionalDependencies>SketchUpAPI.lib;%(AdditionalDependencies)</AdditionalDependencies>
104104
</Link>
105105
<ProjectReference>
106106
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>

SketchUpNETConsole/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ class Program
1010
{
1111
static void Main(string[] args)
1212
{
13-
if (args.Length > 1)
13+
if (args.Length > 0)
1414
{
1515
SketchUpNET.SketchUp skp = new SketchUpNET.SketchUp();
16-
if (skp.LoadModel(args[1]))
16+
if (skp.LoadModel(args[0]))
1717
{
1818
// do something
1919
}

0 commit comments

Comments
 (0)