In order to load DWG/DXF files from a .NET application compiled against AnyCPU, you can use the BitnessAgnostic helper class, to load the Eyeshot x86 or x64 DLL at runtime and instantiate the ReadAutodesk class using reflection.
The BitnessAgnostic class comes with Eyeshot's code samples, as part of the CustomControls project. To see it in action, simply open one of the Autodesk-related code samples (such as Drafting Demo) and make sure to enable the SETUP compilation symbol.
Comments
This dxf import works fine on all computers for me except one... and I can not understand why it does not work on one.
The crash occurs on "constructor.Invoke(new object[] {@"app8.dwg", null, false, false, false});"
Is there anyway to understand what can cause the crash inside of the constructor?
It looks like we need C++ redist v2019 for Eyeshot v2021. After installing this, it works as expected
Yes, from Eyeshot 2021 at least the C++ 2015 Redistributable version is required
Please sign in to leave a comment.