DMException using SimpleFormsCS example

Moderators: TomKerekes, dynomotion

Post Reply
Juanjo-Lasing
Posts: 25
Joined: Wed Sep 04, 2019 11:56 am

DMException using SimpleFormsCS example

Post by Juanjo-Lasing » Wed Sep 04, 2019 12:58 pm

Hello,

I am trying to run a copy of the example SimpleFormCS, the copy is placed in a different folder.

This exception stops the program when is going to create the KM_Controller: KMotion_dotNet.DMException DLL not found exception thrown.

I build the solutions as is explained in the wiki (debug and realase) and I am referring to KMotion_dotNet.dll archive placed in Kmotion\Release\Kmotion_dotNet.dll

In addition, in the exception details, in inner exception, I can read: "the DLL file 'KMotion_doNet_Interop.dll' can not be loaded".

The original example runs correctly, but if I try to run a copy in other folder, or if I create a new different project, they don't work. The references are the same in all the projects.

It is a reference problem? Or something else?

Thank you!

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: DMException using SimpleFormsCS example

Post by TomKerekes » Wed Sep 04, 2019 1:27 pm

Hi Juanjo,

The KMotion Libraries consist of several dlls, executables, and data files. When your Application runs Windows must be able to find them. The simplest solution is to target your Application to the <>\KMotion\Release folder like the examples do. Another solution is to add the <>\KMotion\Release folder to the Window’s PATH variable. Or add an App Paths registry entry for your Application. See also here.
Regards,

Tom Kerekes
Dynomotion, Inc.

Juanjo-Lasing
Posts: 25
Joined: Wed Sep 04, 2019 11:56 am

Re: DMException using SimpleFormsCS example

Post by Juanjo-Lasing » Wed Sep 04, 2019 3:05 pm

Hello again,

I added the folder to the Window's path variable and now everything is working.

Thanks a lot Tom.

Post Reply