Skp2Xml for 2017 causes crash

Downloaded the SDK, built Skp2Xml with Visual Studio 2015

(attempted to build it first with VS2010 but it said “error MSB8008: Specified platform toolset (v140) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected.”)

Copied the Skp2Xml.dll to C:\Program Files\SketchUp\SketchUp 2017\Exporters

I can open SketchUp, load a model, work as normal, etc. But when I go to File > Export, SketchUp crashes without any errors or warnings. If I delete C:\Program Files\SketchUp\SketchUp 2017\Exporters\Skp2Xml.dll, I can go to File > Export again without crashing.

What is going wrong here? Is it something I did incorrectly, or is the SDK incompatible with SU2017?

That is an old example. Does it use the newer C-side interface ? (One of them is deprecated.)

Not sure what might be deprecated. What is also interesting, is if I run the skp2xml project under debug, it shows various errors, but after stepping past those, SketchUp will successfully show the export dialog, However, export to xml is not listed among the options. I can export a different format successfully.

Went back and ran SketchUp directly, and it again crashes when I select File > Export > 3D Model

My goal is to write an exporter, and this is not encouraging.

Firstly, be sure to read (and perhaps print out) this entire page. It has must know info about memory and objects, etc.:
http://extensions.sketchup.com/developer_center/sketchup_c_api/sketchup/index.html

File: Release Notes — SketchUp Ruby API Documentation says:

###What’s new in SketchUp 2017 M0
####Updated Compilers
We updated our compilers for Windows and macOS. On Windows we are now using Visual Studio 2015 SP1 (targeting Windows 7). On MacOs we are using XCode 7.2.1 (with deployment target 10.10).

… (I know, you’d not be expecting the information you need to be “hidden” within another API’s release notes.)

http://extensions.sketchup.com/developer_center/sketchup_c_api/sketchup/index.html says:

###Build and Release Considerations
###windows

The C API library for Windows is built using Microsoft Visual Studio 2010 SP1.

SketchUp 2016 for Windows is built using Visual Studio 2010 SP1, and so plugins should be built with the Platform Toolset set to Visual Studio 2010 (v100). Using a different Platform Toolset will likely cause the plugin to fail to load and cause SketchUp to crash.

It also says:

It includes both 32-bit and 64-bit binaries.

Which is TRUE for SketchUp 2016, but NOT for SketchUp 2017.

So it seems the C SDK documentation has not entirely been updated for release cycle 17.

@ChrisFullmer @adam @tt_su

Wouldn’t a table be better in the SDK “Build and Release Considerations” section, giving columns for:
SDK release, Visual Studio version, XCode version, etc.
??


I was referring to an (now 3 year old) migration guide that was written for the 2014 release.
It is an HTML file, in the root of the SDK package.
It’s name is “migration_guide.html” but I have not found an online url to it, (so open it from the root of the downloaded SDK package.)

This guide page may refer to this:

SketchUpDeprecatedModelExporterInterface : Old style exporters must implement this interface. Note that this interface is being deprecated.
New exporters must implement SketchUpModelExporterInterface


There is also this page in the SDK documentation:
http://extensions.sketchup.com/developer_center/sketchup_c_api/sketchup/deprecated.html

You’d need to copy and paste the errors into this thread, otherwise the SDK sages will just be guessing.

(See this help topic on formatting code in these forums.)

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.