Hi to all, from spain, many years using Lisp from v9 and later....
Actually I'm migrating lisp code from AutoCAD 2012 to AutoCAD 2018, trying to understand the recent changes about "trusted path", really, I disable all the new facilities.
I use a acaddoc.lsp for load some functions and launch a dialog for load a existing drawing or create a new.
At this moment AutoCAD still using a "no name" drawing (zerop (getvar "dwgtitled")), If T, launch de dialog
If not T and there is some change "DBMOD", I ask for save changes.
The first time I execute the AutoCAD icon in the desktop, I use a "Run in ... c:\aplication"
My recent problem in AutoCAD 2018, where I Edit a existing file, I uses (command "_.open" file), this open the draw, read againg the acaddoc.lsp and the startup file, ok, but someting changes the "DBMOD" variable (Values 5 or 20). And mi old code sais "do you want save changes?" or Open againg the initial dialog asking for open or edit a file.
I think DBMOD was not a very good metod for know if the user make changes inte actual drawing. Probably AutoCAD 2018 changes internally objects, tables or something.
In AutoCAD 2008 and AutoCAD 2012, the code works great, and DBMOD=0.
Can you help me, for detect if the user makes changes in the file, or if the file are with no changes?
Sorry for me english.
Tankhs for read.
Some usseful information: All the users in the office use only AutoCAD with 2 dimensión, and edit only 1 file with 1 AutoCAD instance, there is a lot of list a variables for my application and there is only designed for not share the AutoLISP environmet with many files. Every drawing can have hundreds grating pieces.
(setvar "lispinit" 0)
(setvar "sysmon" 0)
(setvar "sdi" 1)
(setvar "acadlspasdoc" 1)
(setvar "secureload" 0)
(setvar "navbardisplay" 1)