Dealing with DWG/DXF files in Eyeshot requires several additional steps compared to other standard CAD file formats. As all professional CAD systems do, Eyeshot relies on Open Design Alliance for this file format translation. This tool still contains some legacy DLLs that cannot be copied automatically by Visual Studio. You'll find all the necessary DLLs inside the Bin20/Bin40 folders of the Eyeshot installation.
Basically, the required steps to read/write DWG/DXF files are:
- Select between .NET 2.0 or .NET 4.0 and install the proper Microsoft Visual C++ Redistributable Package (2008 or 2010)
- Select between x86 or x64 platform and manually copy all the Eyeshot DLLs and *.tx files to your Bin/Debug or Bin/Release folder
- Reference the relevant Eyeshot DLL in your Visual Studio project (its name terminates with .x86.dll or .x64.dll)
- Add the ViewportLayout.ReadAutodesk()/WriteAutodesk() call in your code
The attached sample performs a DWG read based on .NET Framework 2.0 and x86 as target platform. It also include the Microsoft Visual C++ 2008 Redistributable Package in the case you still need to install it.