Author Topic: remove blocks from recent list with lisp  (Read 1423 times)

0 Members and 1 Guest are viewing this topic.

PM

  • Guest
remove blocks from recent list with lisp
« on: September 09, 2021, 03:15:14 AM »
Hi i am using this code to delete recent block list. This code works fine in autocad 2020. Now i am using autocad 2022 and this code to nothing

th reg path is

Code - Auto/Visual Lisp: [Select]
  1. \HKEY_CURRENT_USER\SOFTWARE\Autodesk\AutoCAD\R24.1\ACAD-5101:409\Recent File List
  2.  

Code - Auto/Visual Lisp: [Select]
  1. (defun c:NoRecentBlist ( / reg-key n)
  2. (setq reg-key (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Profiles\\" (getvar "CPROFILE") "\\BlockContent\\Recent"))
  3.                 (vl-registry-delete reg-key n)
  4. )
  5.         (princ)
  6. )
  7.  
  8.  

I know that in autocad 2022 with right click i can delete the recent block list but i want to do it with lisp code or I don't know if there a new command in comand line to do this.

Thanks

Crank

  • Water Moccasin
  • Posts: 1503
Re: remove blocks from recent list with lisp
« Reply #1 on: September 09, 2021, 06:12:31 AM »
Yes, that's the code from here.

The registry key is still there, but I doubt if it has any use anymore.
Your recent blocks are now stored 'in the cloud'. So they are attached to your AutodeskID (Blocks are only accessible across devices if you use cloud storage).
On the recent tab there is a button for OPTIONS. On that panel you can turn off cloud storage.
On that same panel is the information where your recent blocks are locally stored:


In that folder there is a subfolder 'RecentBlocks'. Delete that subfolder and your recent blocks will be gone (in the next drawing).

The there is this variable BLOCKMRULIST. The initial value is 50, but you could set that value to 12.
Vault Professional 2023     +     AEC Collection

PM

  • Guest
Re: remove blocks from recent list with lisp
« Reply #2 on: September 09, 2021, 09:01:49 AM »
Hi Crank. Iam not using the cloud ,and i never log in with passwords in any cloud (autodesk, adobe or windows). I am working every time in my hard drives

Thanks

Crank

  • Water Moccasin
  • Posts: 1503
Re: remove blocks from recent list with lisp
« Reply #3 on: September 09, 2021, 05:00:21 PM »
That's good, because when your folder is synchronized, it will have no use that you erase the folder.


Code: [Select]
(defun c:NoRecentBlist (/ F)
(setq F (vlax-create-object "Scripting.FileSystemObject"))
(vlax-invoke F "DeleteFolder" (strcat (getvar "BLOCKSYNCFOLDER") "\\RecentBlocks") :vlax-true)
(vlax-release-object F)
(princ)
)
Vault Professional 2023     +     AEC Collection