<div dir="ltr">It's not totally clear to me what the objective is for your DWGs.<div><br></div><div>By "preview", do you mean wish to just view an overview image of the DWG contents? If that is the case, I would recommend using a separate command line/ batch process to produce raster format previews as DWGs. You can then create a new field for the accompanying raster file using the field calculator and QGIS expressions.</div><div><div><br></div><div>With the rasters you can use the preview option in the feature form, or even use a "Raster Image Marker" based symbol at certain scales to represent the DXF previews.</div><div><br></div><div>Another option for previews is to use the "Show map tips" option from the QGIS toolbars. In the "Display" section of the layer properties you will find that tooltips can use HTML code which will render a "web preview" of the feature when you hover the cursor on it. for example, the following should allow image previews:</div><div><br></div><div><span style="font-family:monospace"><img src='file:///[%  @project_folder || '/' || "image" %]' height=400 width=400 /></span><br></div><div><br></div><div>In theory, you could likely combine this with a DWG rendering library such as <a href="https://sharecad.org/it/DWGOnlinePlugin">https://sharecad.org/it/DWGOnlinePlugin</a> but I expect it will be difficult to use and not very efficient, hence why I would suggest converting the data to raster beforehand. One other thing you could do as well is to use the "web view" of the QGIS form to render an html template with an integrated viewer, but again, this is likely difficult and not necessary.</div><div><br></div><div>I am not aware of any "preview" plugin for rendering DWG data within QGIS.</div><div></div><div><br></div><div>If your aim is to "load" the DWG into your project from a command available within the point feature attributes, this is supported by using GitHub actions and some custom code, although the process may be quite cumbersome. Actions functionality was covered on the last QGIS Open Day[1] and I recommend watching the demonstration if that is your use case. Alternatively, there is also some written material on this topic [2] f you would prefer to start there</div><div><br></div><div>[1] <a href="https://github.com/qgis/QGIS/wiki/QOD-June-2021#qgis-actions-deep-dive">https://github.com/qgis/QGIS/wiki/QOD-June-2021#qgis-actions-deep-dive</a><br></div><div>[2] <a href="https://courses.spatialthoughts.com/pyqgis-in-a-day.html#creating-custom-python-actions">https://courses.spatialthoughts.com/pyqgis-in-a-day.html#creating-custom-python-actions</a></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 20 Jul 2021 at 16:40, todor lambev <<a href="mailto:totolamb@abv.bg">totolamb@abv.bg</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<div>Dear QGIS developers, </div><div><br></div><div>I have a strange need. Could you help me? </div><div>I have 30 000 DWG files that are not georeferenced, each file has unique and a specific name. I have a point shapefile which in its attribute table contains a column with the names of the *dwg files. </div><div><br></div><div>My question is: How I can load to preview the DWG files in QGIS next to the points or to preview the DWG by clicking on the point (similar to the photo preview widget)?</div><div><br></div><div>I hope that you won't skip my question and will help me to find a solution basically because otherwise, I have to do it manually...</div><div>  </div><div>Best regards<br><pre><font face="Calibri, sans-serif"><span style="line-height:17.12px">Todor Lambev, PhD Student
</span></font><span style="line-height:17.12px;font-family:Calibri,sans-serif">- - - - -
</span><span style="line-height:17.12px;font-family:Calibri,sans-serif"><b>Institute of Oceanology
</b><i>Department of coastal zones dynamics
mob: +359 886 75 72 85;
Varna, Bulgaria
URL: <a href="http://www.io-bas.bg" target="_blank">http://www.io-bas.bg</a></i></span></pre></div></div>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div>