How to View DWG or DXF file python application

327 views Asked by At

I have created a python application using pyqt5. Now I want to show DWG or DXF file in my UI without converting into another format. Is there any solution for that?

I tried library called ezdxf and still not able to show DWG or DXF in my python application which I created using pyqt5. DWG is not readable and DXF is readable but not able to show in my UI as it is. If anyone know please help. It is standalone application so will not be able to use Py AutoCAD library as need AutoCAD to be installed in system.

1

There are 1 answers

0
mozman On

Ezdxf includes a drawing add-on to render the content of DXF files into various file formats.

A backend for PySide6 and PyQt5 is included. The qtviewer.py module implements the core of a simple DXF viewer and the cad_viewer.py example is a skeleton to show how to use the CADViewer class in a PyQt application.

The drawing add-on is meant for simple 2D DXF files, don't expect all features and the quality of AutoCAD!