More Free AutoLISP and Visual LISP code snippets for AutoCAD

Example how to add personal mtext symbols like below in the mtext editor:

Blog post: Add personal mtext symbols or text snippets in AutoCAD

 Click here to download the code as a file.


;;; PersonalMtextSymbols.LSP ver 1.1
;;; Add personal mtext symbols in the right click menu in the mtext editor
;;; By Jimmy Bergmark
;;; Copyright (C) 1997-2012 JTB World, All Rights Reserved
;;; Website:
;;; E-mail:
;;; Tested on AutoCAD 2002, 2004, 2005, 2008, 2009. 
;;; Not sure about 2006. 2007 does not support this. 
;;; Works in AutoCAD 2012, AutoCAD 2013.
;;; Remember that you can change the contents to whatever you would like
;;; The syntax is:
;;; (vl-registry-write key "Name <1,2,3...n>" "<Description>")
;;; (vl-registry-write key "Contents <1,2,3...n>" "<Value>")

(defun PersonalMtextSymbols ()
  (setq key (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\MTEXT\\Symbols"))
  (vl-registry-write key "Name 1" "Name")
  (vl-registry-write key "Name 2" "Company")
  (vl-registry-write key "Contents 1" "Jimmy Bergmark")
  (vl-registry-write key "Contents 2" "JTB World")

(defun c:PM ()