AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

Here's something that you could maybe build on :
Would you like to add a note to any object or entity in your drawing?

;AUTOLISP CODING STARTS HERE

(prompt "\nType AddNote to run.")

(defun C:AddNote ( / ss1 pt1 pt2 ar ao thenote)

(setq ar "I")

(setq ao "O")

(setq ar (getstring "\nRemove/Insert <I> : "))

(if (= (strcase ar) "R")

(progn

(setq ss1 (ssget))

(command "-HYPERLINK" "R" ss1 "" "*")

);progn

(progn

(setq ao (getstring "\nArea/Object <O> : "))

(if (= (strcase ao) "O")

(progn

(setq ss1 (ssget))

(setq thenote (getstring T "\nEnter Note : "))

(command "-HYPERLINK" ar ao ss1 "" "" "" thenote)

);progn

(progn

(setq pt1 (getpoint "\Enter first point : "))

(setq pt2 (getcorner pt1 "\nEnter second point "))

(setq thenote (getstring T "\nEnter Note : "))

(command "-HYPERLINK" ar ao pt1 pt2 "" "" thenote)

);progn

);if

);progn

);if

(princ)

);defun

(princ)

;AUTOLISP CODING ENDS HERE

Save this as "AddNote.lsp"

The AutoLisp/Visual Lisp/VBA Resource Website

Copyright © 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website