Author Topic: MIGRATING FROM AutoCAD2012 to AutoCAD2018  (Read 1575 times)

0 Members and 1 Guest are viewing this topic.

Javi

  • Mosquito
  • Posts: 2
MIGRATING FROM AutoCAD2012 to AutoCAD2018
« on: December 27, 2018, 07:53:45 AM »
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)

tombu

  • Bull Frog
  • Posts: 289
  • ByLayer=>Not0
Re: MIGRATING FROM AutoCAD2012 to AutoCAD2018
« Reply #1 on: December 27, 2018, 10:51:37 AM »
DBMOD must have changed then. It was probably changed by acaddoc.lsp setting system variables.
DBMOD (System Variable) https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/AutoCAD-Core/files/GUID-E255E808-2D48-4BDE-A760-FFEA28E5A86F-htm.html  I still use DBMOD in my acaddoc.lsp.

For code compatability some of the system variables no longer documented in Help may still be set, but may not give you the results you're looking for.

You're probably better off trying to learn 2018 as many of the improvements over the years may have removed the need for much of what you're loading.

Not knowing how you're using (command "_.open" file) you may want to try something like
Code: [Select]
^C^C^P(vla-activate(vla-open (vla-get-documents (vlax-get-acad-object))(findfile "file") :vlax-false))
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D

Javi

  • Mosquito
  • Posts: 2
Re: MIGRATING FROM AutoCAD2012 to AutoCAD2018
« Reply #2 on: December 28, 2018, 07:13:07 AM »
I are using (command "_.open" file), because It, close the actual file, saving the changes if necesary, and open a new document with the AutoLISP environment clean.

My user works with 1 instance of AutoCAD for every file/draw, I think there is better. But not sure. (More RAM resources in the computers and probably poor performance)

The problem is my users launch an automated print process for every piece in the actuall draw and take about 3-4 minutes for print 100 pieces, buildon individual pdf sheet for manufacture process, and don't wait, they open a new AutoCAD with a new plane to work.

They aren't familiar with using tabs inside AutoCAD for work, the are "old schools" users.

I think using tabs can confuse the user about the actuall draw, every draw are diferent customer plane.

I must learn about vla funcions and about working using tabas for every draw.

Thanks

PKENEWELL

  • Bull Frog
  • Posts: 317
Re: MIGRATING FROM AutoCAD2012 to AutoCAD2018
« Reply #3 on: December 28, 2018, 09:49:40 AM »
Why are you not just using the SDI system variable for Single document mode? When SDI is set to 1, AutoCAD will only open 1 document at a time.
"When you are asked if you can do a job, tell 'em, 'Certainly I can!' Then get busy and find out how to do it." - Theodore Roosevelt