Looping through Drawings Problem (VL Namespace Mismatch)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have recently upgraded to AutoCAD 2017 (from AutoCAD 2012) and am struggling to run a routine that was previously fine (in 2012)
The Routine was used to loop through any number of drawings, perform a task and then move on to the next..
The bones of this routine are below,, The Error I now receive is "***INTERNAL ERROR: VL Namespace Mismatch Type Y to Reset" after the first drawing is opened.. it then stops. If the code is pasted in line by line into the command window, it appears to function without a hitch. Any clues or suggestions would be very welcome.
(defun c:looptest ()
(vl-load-com)
(setvar "lispinit" 0)
(setvar "sdi" 1)
(setq dwglist (list "c:\\temp\\a.dwg" "c:\\temp\\b.dwg"))
(repeat (length dwglist)
(vla-zoomextents (vlax-get-acad-object))
(vl-cmdf "open" "y" (car dwglist))
(vla-zoomextents (vlax-get-acad-object))
(alert (getvar "dwgname"))
(setq dwglist (cdr dwglist))
)
(alert "Complete")
(setvar "sdi" 0)
)