SketchUp SDK for visual studio 2015

Hi.
I have a system in .net that displays models of SKP, my problem is that versions 18-19 do not work for me and all versions up to 17 work for me,I downloaded the SDK 2019 and called the function “SUModelCreateFromFile” I get EROR" SU_ERROR_MODEL_VERSION "

Can you provide an example file and minimal example code that produce this?

SDK should be backwards compatible, so I’d rather have a look at trying to understand why you get errors with the newer SDKs.

this is a code from sdk 2019 Sample "Reading From A skp File "

i want to activate this code with C# so i added ref to class

 namespace Test 
{
	public ref class main {//added ref for c# code 
	public:
		 void add() {
			// Always initialize the API before using it
			SUInitialize();

			// Load the model from a file
			SUModelRef model = SU_INVALID;
			int  res = SUModelCreateFromFile(&model, "CSKP Model 2018.skp");
} 

C# code ;

public static void main(string [ ] args)
{
            Test.main t = new Test.main();

            t.add();
}

Can you also provide the example file? (You can send it as a Private Message if you don’t want to share it publicly.)

(Btw, I edited your post to put your code in code-boxes for readability.)

You mean the SKP 2018 file or my whole project?

Just the example SKP file.

SKP Model 2018.skp (1.9 MB)

You are not alone

try to check in this topic.
i resolved the problem for me maybe it will help you

That’s a good point, @igal.itzhakov - have you checked if you are loading all the required DLLs?

We are experiencing the same issue. Have tried the suggestion from @EliranKasif but still doesn’t work. We’d really like to resolve this as soon as possible so that we can incorporate support for SketchUp 2019 into our product.

@igal.itzhakov Did you find a solution?

Can you provide a bare minimum example to demonstrate the issue? A simple CLI app where you try to load an SU2019 skp files in the main?

We are not able to reproduce on our end. But it might be we set things up differently from your environment. A complete minimal project would be of help.

Be sure you see in the Output window of your IDE that the program Loaded the 2 dll’s files.
try to run the samples projects in the SDK 2019 dir also to check if your IDE loaded the 2 dll’s files.

@tt_su @EliranKasif

Thank you for your responses.

We are currently investigating the reason for this error, and it’s seems likely that we can fix it on our own.

There is a high chance that the problem is due to the native extension bridge class not supporting the new version of the SDK.

We will keep in touch in case we run into some problem that is outside of our scope, and let you know if we are able to find a solution.

1 Like