TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: fabcad on May 04, 2022, 03:16:30 AM

Title: Importing Qgis Bookmarks into AutoCAD Views
Post by: fabcad on May 04, 2022, 03:16:30 AM
Hello,

When exporting bookmarks from QGIS, I noticed that it exported them in an xml file therefore readable.

How could one with this xml file create views in AutoCAD model space.

Quote
Name of view :
<name>PBIL Question 1</name>

View Window Coordinates :
<xmin>1366793.34201767994090915</xmin>
<ymin>7221786.59448403026908636</ymin>
<xmax>1366849.05579161993227899</xmax>
<ymax>7221825.61212700977921486</ymax>

Thanks in advance,

Fabcad
Le Rennais Métropolitain
Title: Re: Importing Qgis Bookmarks into AutoCAD Views
Post by: dgpuertas on May 04, 2022, 04:44:38 AM

vk_ReadXML can be useful

https://www.cadtutor.net/forum/topic/21901-internet-news-reader/



Title: Re: Importing Qgis Bookmarks into AutoCAD Views
Post by: It's Alive! on May 04, 2022, 07:30:19 PM
I think you can use entmake, maybe something like ..?..
https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-do-i-entmake-a-view/td-p/899433

i've pretty much lost my lisp  :mrgreen:
Title: Re: Importing Qgis Bookmarks into AutoCAD Views
Post by: fabcad on May 05, 2022, 02:15:17 AM
Hello,

After hours spent testing and rewriting on my editor, I managed to do what I wanted.

Thanks to Gile for his subroutines for creating points.

I put the function in attachment,

Fabcad
Le Rennais Métropolitain