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 Bin folders of the Eyeshot installation.
Basically, the required steps to read/write DWG/DXF files are:
- Prepare a working Eyeshot based Visual Studio project (or start from one of the source code samples)
- Change the Target Platform of your Visual Studio project to x86
- Add the Bin\x86\devDept.Eyeshot.Control.x86.dll to your Visual Studio project references
- Change the type of the viewportLayout1 control from ViewportLayout to ViewportLayoutEx in the Form designer file1
- Manually copy the Bin\x86\AcIdViewObj_3.09_10.tx and RecomputeDimBlock_3.09_10.tx files to your Bin/Debug or Bin/Release folder2
- Add the ViewportLayoutEx.ReadAutodesk()/WriteAutodesk() call in your code3
1 If you plan to use the ReadAutodesk class this step is not strictly necessary
2 These *.tx files can be easily added to your Visual Studio project as well to automate the file copy operation
3 ViewportLayoutEx.ReadAutodesk() is performed asynchronously. To take full control on how the file import is performed use directly the ReadAutodesk class (see Import/Export topic of the documentation)
Please note that once completed the steps above, the number of Eyeshot DLLs in the project references will be three compared to the single one of Eyeshot 6.0.
On end-user machines the Microsoft Visual C++ 2010 Redistributable Package is also required.