Author Topic: Clearing Recent Files list  (Read 1426 times)

0 Members and 1 Guest are viewing this topic.

GDF

  • Water Moccasin
  • Posts: 2081
Clearing Recent Files list
« on: April 14, 2020, 06:22:56 PM »
I'm trying to clear the recent files opened using the routine below without any luck:

Using Windows 10 BricsCAD V20 en_US.
Any suggestions?

Code: [Select]
(defun c:CleanRecentFiles (/ root m)
  (vl-load-com)
  (setq root (strcat "HKEY_CURRENT_USER\\" (VLAX-MACHINE-PRODUCT-KEY) "\\Recent Paths\\")
        m 0)
  (foreach item ((lambda   (/ n values val)
                   (setq n 0)
                   (while (setq val (vl-registry-read root (strcat "File" (itoa (setq n (1+ n))))))
                     (setq values (cons val values))
                     (vl-registry-delete root (strcat "File" (itoa n))))
                   (reverse values)))
    (if (wcmatch (strcase item) "*DWG")
      (vl-registry-write root (strcat "File" (itoa (setq m (1+ m)))) item)))
  (princ (strcat "\n" (itoa m) " DWG files remain in recent drawings list"))
  (princ))
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

stevej

  • Newt
  • Posts: 30
Re: Clearing Recent Files list
« Reply #1 on: April 14, 2020, 08:38:21 PM »
My Bricscad V19 saves recent file list in HKEY_USERS:
Computer\HKEY_USERS\S-1-5-21-2508002406-3670995003-1946860359-1000\Software\Bricsys\BricsCAD\V19x64\en_US\Recent Paths

Steve

GDF

  • Water Moccasin
  • Posts: 2081
Re: Clearing Recent Files list
« Reply #2 on: April 14, 2020, 09:02:44 PM »
Thanks
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

BIGAL

  • Swamp Rat
  • Posts: 1409
  • 40 + years of using Autocad
Re: Clearing Recent Files list
« Reply #3 on: April 15, 2020, 02:55:17 AM »
Don't forget (vlax-product-key) handy for when V20
A man who never made a mistake never made anything

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Clearing Recent Files list
« Reply #4 on: April 15, 2020, 04:08:21 AM »
Last time I checked this doesn't work. BricsCAD keeps a list in memory and writes it to the registry on exit. Any modifications you perform will be lost.