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

This functionality is broken in AutoCAD 2019. The first one is not working, the second one takes the value from the first one, etc.

 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: www.jtbworld.com
;;; E-mail: info@jtbworld.com
;;; Tested on AutoCAD 2002, 2004, 2005, 2008, 2009. 
;;; Not sure about 2006. 2007 does not support this. 
;;; Works in AutoCAD 2012, AutoCAD 2013.
;;; Does not work as expected in AutoCAD 2019 ;;; ;;; 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 () (vl-load-com) (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 () (PersonalMtextSymbols) (princ) )
Have any questions? Contact us