<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Modify this lisp please in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10963163#M48843</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6613855"&gt;@Philip-John&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest that if what&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;has provided you works well enough, then use it.&lt;/P&gt;
&lt;P&gt;If not, then I'm sure he would merge my code into his for you.&amp;nbsp; A number of us work together around here to provide solutions.&lt;/P&gt;
&lt;P&gt;But really, it's time for you to be learning this handy programming language to be able to help yourself.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Feb 2022 16:44:48 GMT</pubDate>
    <dc:creator>john.uhden</dc:creator>
    <dc:date>2022-02-21T16:44:48Z</dc:date>
    <item>
      <title>Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961352#M48831</link>
      <description>&lt;P&gt;I got the following lisp to label 'Area' and 'Perimeter' of the selected closed polylines.&lt;/P&gt;&lt;P&gt;When running the lisp it asks "Select TEXT to match height". Somehow it's not working whereas I have to manually input the text height (... but it is ok).&lt;/P&gt;&lt;P&gt;Can someone modify the lisp to:&lt;/P&gt;&lt;P&gt;1. It should ask to&amp;nbsp;"Select TEXT to match height OR enter text height"&lt;/P&gt;&lt;P&gt;2. The value selected or entered should be remembered till the file closes.&lt;/P&gt;&lt;P&gt;Please help..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun C:mynewarea (/ acsp adoc ar axss txht maxp minp obj p1 p2 pc1 pc2 per&lt;BR /&gt;ss txts txt1 txt2)&lt;/P&gt;&lt;P&gt;(vl-load-com)&lt;BR /&gt;(setq adoc (vla-get-activedocument&lt;BR /&gt;(vlax-get-acad-object)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(if (and&lt;BR /&gt;(= (getvar "tilemode") 0)&lt;BR /&gt;(= (getvar "cvport") 1)&lt;BR /&gt;)&lt;BR /&gt;(setq acsp (vla-get-paperspace adoc))&lt;BR /&gt;(setq acsp (vla-get-modelspace adoc))&lt;BR /&gt;)&lt;BR /&gt;(vla-startundomark (vla-get-activedocument&lt;BR /&gt;(vlax-get-acad-object)))&lt;BR /&gt;(setQ txht (getreal "\nSelect TEXT to match height: "))&lt;BR /&gt;(setQ tx1 (/ txht 3))&lt;BR /&gt;(setQ tx2 (/ txht 1))&lt;/P&gt;&lt;P&gt;(prompt "\n Select OBJECTS on screen to add area label")&lt;/P&gt;&lt;P&gt;(if (setq ss (ssget))&lt;BR /&gt;(progn&lt;BR /&gt;(setq axss (vla-get-activeselectionset adoc))&lt;BR /&gt;(vlax-for obj axss&lt;BR /&gt;(if&lt;BR /&gt;(and&lt;BR /&gt;(not&lt;BR /&gt;(vl-catch-all-error-p&lt;BR /&gt;(setq&lt;BR /&gt;ar (vl-catch-all-apply&lt;BR /&gt;(function (lambda()&lt;BR /&gt;(vlax-curve-getarea obj)))))))&lt;BR /&gt;(not&lt;BR /&gt;(vl-catch-all-error-p&lt;BR /&gt;(setq&lt;BR /&gt;per (vl-catch-all-apply&lt;BR /&gt;(function (lambda()&lt;BR /&gt;(vlax-curve-getdistatparam obj&lt;BR /&gt;(vlax-curve-getendparam obj)))))))))&lt;/P&gt;&lt;P&gt;(progn&lt;BR /&gt;(setq txt2 (strcat "Area= " (rtos ar 2 2)))&lt;BR /&gt;(setq txt3 (strcat "Perimeter= " (rtos per 2 2)))&lt;/P&gt;&lt;P&gt;(setq pc1 (getpoint "\nPick Insertion point."))&lt;BR /&gt;(setq pc2 (mapcar '- pc1 (list 0 (* tx2 1.5) 0)))&lt;BR /&gt;(setq pc3 (mapcar '- pc2 (list 0 (* tx2 1.5) 0)))&lt;BR /&gt;;(setq pc4 (mapcar '- pc3 (list 0 (* tx2 1.5) 0)))&lt;/P&gt;&lt;P&gt;(command "text" pc2 tx2 "" txt2)&lt;BR /&gt;(command "text" pc3 tx2 "" txt3)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(vla-endundomark (vla-get-activedocument&lt;BR /&gt;(vlax-get-acad-object)))&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;BR /&gt;(princ "\n Type mynewarea to label objects with area and perimeter text")&lt;BR /&gt;(princ)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 14:39:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961352#M48831</guid>
      <dc:creator>Philip-John</dc:creator>
      <dc:date>2022-02-20T14:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961372#M48832</link>
      <description>&lt;P&gt;(defun C:mynewarea (/ acsp adoc ar axss txht maxp minp obj p1 p2 pc1 pc2 per&lt;BR /&gt;ss txts txt1 txt2)&lt;/P&gt;
&lt;P&gt;(vl-load-com)&lt;BR /&gt;(setq adoc (vla-get-activedocument&lt;BR /&gt;(vlax-get-acad-object)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(if (and&lt;BR /&gt;(= (getvar "tilemode") 0)&lt;BR /&gt;(= (getvar "cvport") 1)&lt;BR /&gt;)&lt;BR /&gt;(setq acsp (vla-get-paperspace adoc))&lt;BR /&gt;(setq acsp (vla-get-modelspace adoc))&lt;BR /&gt;)&lt;BR /&gt;(vla-startundomark (vla-get-activedocument&lt;BR /&gt;(vlax-get-acad-object)))&lt;BR /&gt;(setQ txht (vlax-get (vlax-ename-&amp;gt;vla-object(car (entsel "\nSelect TEXT to match height: "))) 'Height))&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;(prompt "\n Select OBJECTS on screen to add area label")&lt;/P&gt;
&lt;P&gt;(if (setq ss (ssget))&lt;BR /&gt;(progn&lt;BR /&gt;(setq axss (vla-get-activeselectionset adoc))&lt;BR /&gt;(vlax-for obj axss&lt;BR /&gt;(if&lt;BR /&gt;(and&lt;BR /&gt;(not&lt;BR /&gt;(vl-catch-all-error-p&lt;BR /&gt;(setq&lt;BR /&gt;ar (vl-catch-all-apply&lt;BR /&gt;(function (lambda()&lt;BR /&gt;(vlax-curve-getarea obj)))))))&lt;BR /&gt;(not&lt;BR /&gt;(vl-catch-all-error-p&lt;BR /&gt;(setq&lt;BR /&gt;per (vl-catch-all-apply&lt;BR /&gt;(function (lambda()&lt;BR /&gt;(vlax-curve-getdistatparam obj&lt;BR /&gt;(vlax-curve-getendparam obj)))))))))&lt;/P&gt;
&lt;P&gt;(progn&lt;BR /&gt;(setq txt2 (strcat "Area= " (rtos ar 2 2)))&lt;BR /&gt;(setq txt3 (strcat "Perimeter= " (rtos per 2 2)))&lt;/P&gt;
&lt;P&gt;(setq pc1 (getpoint "\nPick Insertion point."))&lt;BR /&gt;(setq pc2 (mapcar '- pc1 (list 0 (* txht 1.5) 0)))&lt;BR /&gt;(setq pc3 (mapcar '- pc2 (list 0 (* txht 1.5) 0)))&lt;BR /&gt;;(setq pc4 (mapcar '- pc3 (list 0 (* txht 1.5) 0)))&lt;/P&gt;
&lt;P&gt;(command "text" pc2 txht "" txt2)&lt;BR /&gt;(command "text" pc3 txht "" txt3)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(vla-endundomark (vla-get-activedocument&lt;BR /&gt;(vlax-get-acad-object)))&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;BR /&gt;(princ "\n Type mynewarea to label objects with area and perimeter text")&lt;BR /&gt;(princ)&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 15:01:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961372#M48832</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2022-02-20T15:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961422#M48833</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;P&gt;Fine it's working.. But the text height should be keep remembered (in a variable) till I close the file.&lt;/P&gt;&lt;P&gt;I mean, the second time when I run the lisp it should keep the same text height 'if I hit enter button' against the prompt "&lt;SPAN&gt;Select TEXT to match height:&lt;/SPAN&gt;".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 16:15:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961422#M48833</guid>
      <dc:creator>Philip-John</dc:creator>
      <dc:date>2022-02-20T16:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961438#M48834</link>
      <description>&lt;P&gt;Here is updated code that keeps text height after first selection.&lt;/P&gt;
&lt;P&gt;I have also repaired some other errors.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:mynewarea (/ *error* acsp adoc ar axss maxp minp obj p1 p2 pc1 pc2 pc3 per
ss txts  txt2 txt3)
(defun *error* ( msg )
	(if (not (member msg '("Function cancelled" "quit / exit abort")))
		(princ (strcat "\nError: " msg))
	)
	(if adoc (vla-endundomark adoc))
	(princ)
)
(vl-load-com)
(setq adoc (vla-get-activedocument(vlax-get-acad-object)))
(vla-endundomark adoc)

(if (and
(= (getvar "tilemode") 0)
(= (getvar "cvport") 1)
)
(setq acsp (vla-get-paperspace adoc))
(setq acsp (vla-get-modelspace adoc))
)
(vla-startundomark adoc)
(if (not txht)(setQ txht (vlax-get (vlax-ename-&amp;gt;vla-object(car (entsel "\nSelect TEXT to match height: "))) 'Height)))


(prompt "\n Select OBJECTS on screen to add area label")

(if (setq ss (ssget))
(progn
(setq axss (vla-get-activeselectionset adoc))
(vlax-for obj axss
(if
(and
(not
(vl-catch-all-error-p
(setq
ar (vl-catch-all-apply
(function (lambda()
(vlax-curve-getarea obj)))))))
(not
(vl-catch-all-error-p
(setq
per (vl-catch-all-apply
(function (lambda()
(vlax-curve-getdistatparam obj
(vlax-curve-getendparam obj)))))))))

(progn
(setq txt2 (strcat "Area= " (rtos ar 2 2)))
(setq txt3 (strcat "Perimeter= " (rtos per 2 2)))

(setq pc1 (getpoint "\nPick Insertion point."))
(setq pc2 (mapcar '- pc1 (list 0 (* txht 1.5) 0)))
(setq pc3 (mapcar '- pc2 (list 0 (* txht 1.5) 0)))
;(setq pc4 (mapcar '- pc3 (list 0 (* txht 1.5) 0)))

(command "text" pc2 txht "" txt2)
(command "text" pc3 txht "" txt3)
)
)
)
)
)
(vla-endundomark adoc)
(princ)
)
(princ "\n Type mynewarea to label objects with area and perimeter text")
(princ)&lt;/LI-CODE&gt;
&lt;P&gt;If you need to change text height use following function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:mynewarea_text_height()
(setQ txht (vlax-get (vlax-ename-&amp;gt;vla-object(car (entsel "\nSelect TEXT to match height: "))) 'Height))
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 16:34:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961438#M48834</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2022-02-20T16:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961455#M48835</link>
      <description>&lt;P&gt;Thanks again&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Can you combine both part to one?&lt;/P&gt;&lt;P&gt;I mean; each time it should ask to "Select TEXT to match height" and if I hit 'Enter' button (without selecting any TEXT) the routine should use the previously selected&amp;nbsp;&lt;SPAN&gt;height.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 16:59:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961455#M48835</guid>
      <dc:creator>Philip-John</dc:creator>
      <dc:date>2022-02-20T16:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961483#M48836</link>
      <description>&lt;P&gt;I hope this is it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:mynewarea 
	(/ *error* m e acsp adoc ar axss maxp minp obj p1 p2 pc1 pc2 pc3 per ss txts  txt2 txt3)
	(defun *error* ( msg )
		(if (not (member msg '("Function cancelled" "quit / exit abort")))
			(princ (strcat "\nError: " msg))
		)
		(if adoc (vla-endundomark adoc))
		(setvar 'cmdecho 1)
		(princ)
	)
	(defun set_text ( )
		(setq e (car (entsel "\nSelect TEXT to match height: ")))
		(if e (setq m (vlax-get (vlax-ename-&amp;gt;vla-object e) 'Height)))
		m
	)
	(vl-load-com)
	(setq adoc (vla-get-activedocument(vlax-get-acad-object)))
	(vla-endundomark adoc)

	(if (and(= (getvar "tilemode") 0)(= (getvar "cvport") 1))
		(setq acsp (vla-get-paperspace adoc))
		(setq acsp (vla-get-modelspace adoc))
	)
	(vla-startundomark adoc)
	(setq m (set_text))
	(if (and m) (setq txht m))
	(cond ((and txht)

			(prompt "\n Select OBJECTS on screen to add area label")
			(if (setq ss (ssget))
				(progn
					(setq axss (vla-get-activeselectionset adoc))
					(vlax-for obj axss
						(if
							(and
								(not
									(vl-catch-all-error-p 
										(setq ar 
											(vl-catch-all-apply 
												(function (lambda() (vlax-curve-getarea obj)))
											)
										)
									)
								)
								(not
									(vl-catch-all-error-p 
										(setq per 
											(vl-catch-all-apply
												(function (lambda()(vlax-curve-getdistatparam obj (vlax-curve-getendparam obj))))
											)
										)
									)
								)
							)
							(progn
							    (setvar 'cmdecho 0)
								(setq
									txt2 (strcat "Area= " (rtos ar 2 2))
									txt3 (strcat "Perimeter= " (rtos per 2 2))
									pc1 (getpoint "\nPick Insertion point.")
									pc2 (mapcar '- pc1 (list 0 (* txht 1.5) 0))
									pc3 (mapcar '- pc2 (list 0 (* txht 1.5) 0))
								)
								(command "text" pc2 txht "" txt2)
								(command "text" pc3 txht "" txt3)
								(setvar 'cmdecho 1)
							)
						)
					)
				)
			)
		)
		(T (princ "\nYou ahould set inital text height. Start again!"))
	)
	(vla-endundomark adoc)
	(princ "\nDOne!")
	(princ)
)
(princ "\n Type mynewarea to label objects with area and perimeter text")
(princ)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 17:55:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961483#M48836</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2022-02-20T17:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961747#M48837</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6613855"&gt;@Philip-John&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ah, the man with the interchangeable names (though not one of the Mamas and Papas).&lt;/P&gt;
&lt;P&gt;While (initget 128) will allow keywords to entsel, that doesn't allow you to arbitrarily enter a numeric value to entsel, so I think you would have to do something like the following (not tested):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;;; where *txht* can remain global for the current drawing.
(if (not *txht*)(setq *txht* (getvar "textsize"))
;;| It's sort of an old convention among old lispers (of which I am one) to place * at both ends of an intentional global variable.
|;;
(or
  (and
    (setq e (car (entsel "\nSelect text for height or Enter to enter: ")))
    (setq obj (vlax-ename-&amp;gt;vla-object e))
    (vlax-property-available-p object 'Height)
    (setq *txht* (vlax-get obj 'Height))
  )
  (and
    (not (initget 6)) ; no zeros or negatives
    (setq ht (getdist (strcat "\nEnter text height &amp;lt;" (rtos *txht*) "&amp;gt;: ")))
    (setq *txht* ht)
  )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 15:26:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961747#M48837</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2022-02-21T15:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961934#M48838</link>
      <description>&lt;P&gt;Global variables when in doubt I use AH:variablename then I know its mine. So JU:TXTHT could do GL:txtht&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont like using * $ etc in variable names old DOS problems.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 04:09:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10961934#M48838</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-02-21T04:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10962949#M48839</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Working perfectly.&lt;BR /&gt;If you don't mind, can you do a small modification also.&lt;BR /&gt;Presently first time I hit 'Enter' without selecting any text it shows the error "You should set initial text height. Start again!"&lt;/P&gt;&lt;P&gt;instead please modify as follows:&lt;/P&gt;&lt;P&gt;1. When I hit 'Enter' without selecting any text (for first time), it should prompt for "Enter new text height:".[ ]. And it should not move forward without getting a value unless I hit 'Esc'&lt;/P&gt;&lt;P&gt;2. When I hit 'Enter' without selecting any text (next time onwards), again it should prompt for "Enter new text height:".[1.5]. (here 1.5 is previously entered value OR previously selected text height).&lt;/P&gt;&lt;P&gt;Sorry for disturbing you again.&lt;/P&gt;&lt;P&gt;Regards..&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 14:50:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10962949#M48839</guid>
      <dc:creator>Philip-John</dc:creator>
      <dc:date>2022-02-21T14:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10963023#M48840</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6613855"&gt;@Philip-John&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could try my earlier offering again.&amp;nbsp; It had a couple of my mistakes which I have now fixed.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 15:28:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10963023#M48840</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2022-02-21T15:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10963045#M48841</link>
      <description>&lt;P&gt;Thnaks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;..&lt;/P&gt;&lt;P&gt;As a newbie I don't know where to insert your code or how to modify the code.&lt;/P&gt;&lt;P&gt;So if you could do it for me it shall be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 15:43:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10963045#M48841</guid>
      <dc:creator>Philip-John</dc:creator>
      <dc:date>2022-02-21T15:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10963110#M48842</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6613855"&gt;@Philip-John&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Working perfectly.&lt;BR /&gt;If you don't mind, can you do a small modification also.&lt;BR /&gt;Presently first time I hit 'Enter' without selecting any text it shows the error "You should set initial text height. Start again!"&lt;/P&gt;
&lt;P&gt;instead please modify as follows:&lt;/P&gt;
&lt;P&gt;1. When I hit 'Enter' without selecting any text (for first time), it should prompt for "Enter new text height:".[ ]. And it should not move forward without getting a value unless I hit 'Esc'&lt;/P&gt;
&lt;P&gt;2. When I hit 'Enter' without selecting any text (next time onwards), again it should prompt for "Enter new text height:".[1.5]. (here 1.5 is previously entered value OR previously selected text height).&lt;/P&gt;
&lt;P&gt;Sorry for disturbing you again.&lt;/P&gt;
&lt;P&gt;Regards..&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(setq txht 2.5)

(defun C:mynewarea 
	(/ *error* m e acsp adoc ar axss maxp minp obj p1 p2 pc1 pc2 pc3 per ss txts  txt2 txt3)
	(defun *error* ( msg )
		(if (not (member msg '("Function cancelled" "quit / exit abort")))
			(princ (strcat "\nError: " msg))
		)
		(if adoc (vla-endundomark adoc))
		(setvar 'cmdecho 1)
		(princ)
	)
	(defun set_text ( tht)
		(if (and tht)
		(setq e (car (entsel (strcat "\nSelect TEXT to match height: &amp;lt;"  (rtos tht 2 2) "&amp;gt; "))))
		(setq e (car (entsel "\nSelect TEXT to match height: ")))
		)
		
		(if e (setq m (vlax-get (vlax-ename-&amp;gt;vla-object e) 'Height)))
		m
	)
	(vl-load-com)
	(setq adoc (vla-get-activedocument(vlax-get-acad-object)))
	(vla-endundomark adoc)

	(if (and(= (getvar "tilemode") 0)(= (getvar "cvport") 1))
		(setq acsp (vla-get-paperspace adoc))
		(setq acsp (vla-get-modelspace adoc))
	)
	(vla-startundomark adoc)
	(setq m (set_text txht))
	(if (and m) (setq txht m))
	(cond ((and txht)

			(prompt "\n Select OBJECTS on screen to add area label")
			(if (setq ss (ssget))
				(progn
					(setq axss (vla-get-activeselectionset adoc))
					(vlax-for obj axss
						(if
							(and
								(not
									(vl-catch-all-error-p 
										(setq ar 
											(vl-catch-all-apply 
												(function (lambda() (vlax-curve-getarea obj)))
											)
										)
									)
								)
								(not
									(vl-catch-all-error-p 
										(setq per 
											(vl-catch-all-apply
												(function (lambda()(vlax-curve-getdistatparam obj (vlax-curve-getendparam obj))))
											)
										)
									)
								)
							)
							
							(progn
							    (setvar 'cmdecho 0)
								(vla-highlight obj :vlax-true)
								(setq
									txt2 (strcat "Area= " (rtos ar 2 2))
									txt3 (strcat "Perimeter= " (rtos per 2 2))
									pc1 (getpoint "\nPick Insertion point.")
									pc2 (mapcar '- pc1 (list 0 (* txht 1.5) 0))
									pc3 (mapcar '- pc2 (list 0 (* txht 1.5) 0))
								)
								(command "text" pc2 txht "" txt2)
								(command "text" pc3 txht "" txt3)
								(setvar 'cmdecho 1)
								(vla-highlight obj :vlax-false)
							)
						)
					)
				)
			)
		)
		(T (princ "\nEnter new text height by selecting text object!"))
	)
	(vla-endundomark adoc)
	(princ "\nDone!")
	(princ)
)
(princ "\n Type mynewarea to label objects with area and perimeter text")
(princ)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have modified your original code so it works how it does. It is supposed that you select some text entity to collect its height. I would do it by simply entering text value. If global value is not set it exits so that you don't receive error message, and it also informs you to make selection. Code is created the way this function usually work.&lt;/P&gt;
&lt;P&gt;I have added option to sequentially highlight objects according to selection order so you don't have to remember it in case of large number of selected object.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have set default value of text&amp;nbsp; height to 2.5 in firs line&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(setq txht 2.5)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Change it according to your needs.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 19:45:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10963110#M48842</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2022-02-21T19:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10963163#M48843</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6613855"&gt;@Philip-John&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest that if what&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;has provided you works well enough, then use it.&lt;/P&gt;
&lt;P&gt;If not, then I'm sure he would merge my code into his for you.&amp;nbsp; A number of us work together around here to provide solutions.&lt;/P&gt;
&lt;P&gt;But really, it's time for you to be learning this handy programming language to be able to help yourself.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 16:44:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10963163#M48843</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2022-02-21T16:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10964121#M48844</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your lisp.&lt;/P&gt;&lt;P&gt;I need different text in different locations. So setting a default value is difficult for me.&lt;/P&gt;&lt;P&gt;I request you to modify your lisp to (if possible):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. First time if I hit 'Enter' without selecting any match text height, it should prompt for "Specify Text height:". (see image below).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cad copy.png" style="width: 233px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1028030i383FAA8C97230D44/image-size/large?v=v2&amp;amp;px=999" role="button" title="cad copy.png" alt="cad copy.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. If I hit 'Enter' without selecting any match text height, it should prompt for "Specify Text height:" showing the previously selected height. (see image below).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cad.png" style="width: 251px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1028032iBDEC5D6DCB52CB27/image-size/large?v=v2&amp;amp;px=999" role="button" title="cad.png" alt="cad.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 05:20:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10964121#M48844</guid>
      <dc:creator>Philip-John</dc:creator>
      <dc:date>2022-02-22T05:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10964244#M48845</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(setq txht (getvar 'textsize))

(defun C:mynewarea 
	(/ *error* m e acsp adoc ar axss maxp minp obj p1 p2 pc1 pc2 pc3 per ss txts  txt2 txt3)
	(defun *error* ( msg )
		(if (not (member msg '("Function cancelled" "quit / exit abort")))
			(princ (strcat "\nError: " msg))
		)
		(if adoc (vla-endundomark adoc))
		(setvar 'cmdecho 1)
		(princ)
	)
	(defun set_text ( tht)
		(if (and tht)
		(setq e (getreal(strcat "\nEnter text size: &amp;lt;"  (rtos tht 2 2) "&amp;gt; ")))
		(setq e (getreal "\nEnter text size: "))
		)
		e
	)
	(vl-load-com)
	(setq adoc (vla-get-activedocument(vlax-get-acad-object)))
	(vla-endundomark adoc)

	(if (and(= (getvar "tilemode") 0)(= (getvar "cvport") 1))
		(setq acsp (vla-get-paperspace adoc))
		(setq acsp (vla-get-modelspace adoc))
	)
	(vla-startundomark adoc)
	(setq m (set_text txht))
	(if (and m) (setq txht m))
	(cond ((and txht)

			(prompt "\nSelect OBJECTS on screen to add area label")
			(if (setq ss (ssget))
				(progn
					(setq axss (vla-get-activeselectionset adoc))
					(vlax-for obj axss
						(if
							(and
								(not
									(vl-catch-all-error-p 
										(setq ar 
											(vl-catch-all-apply 
												(function (lambda() (vlax-curve-getarea obj)))
											)
										)
									)
								)
								(not
									(vl-catch-all-error-p 
										(setq per 
											(vl-catch-all-apply
												(function (lambda()(vlax-curve-getdistatparam obj (vlax-curve-getendparam obj))))
											)
										)
									)
								)
							)
							
							(progn
							    (setvar 'cmdecho 0)
								(vla-highlight obj :vlax-true)
								(setq
									txt2 (strcat "Area= " (rtos ar 2 2))
									txt3 (strcat "Perimeter= " (rtos per 2 2))
									pc1 (getpoint "\nPick Insertion point.")
									pc2 (mapcar '- pc1 (list 0 (* txht 1.5) 0))
									pc3 (mapcar '- pc2 (list 0 (* txht 1.5) 0))
								)
								(command "text" pc2 txht "" txt2)
								(command "text" pc3 txht "" txt3)
								(setvar 'cmdecho 1)
								(vla-highlight obj :vlax-false)
							)
						)
					)
				)
			)
		)
	)
	(vla-endundomark adoc)
	(princ "\nDone!")
	(princ)
)
(princ "\n Type mynewarea to label objects with area and perimeter text")
(princ)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Change input text how you like inside "\n&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 07:27:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10964244#M48845</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2022-02-22T07:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10964514#M48846</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp; Thanks again..&lt;/P&gt;&lt;P&gt;Your last reply is same as what my first post do. I think you didn't get me completely.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Each time&lt;/STRONG&gt; lisp should ask for &lt;STRONG&gt;"Select TEXT to match height"&lt;/STRONG&gt; and keep remember selected text height value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I hit 'Enter' button&amp;nbsp;&lt;STRONG&gt;without selecting any text&lt;/STRONG&gt; then it should ask for &lt;STRONG&gt;"Specify text height"&amp;nbsp;&lt;/STRONG&gt;and what I specified should remember for next time&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 10:09:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10964514#M48846</guid>
      <dc:creator>Philip-John</dc:creator>
      <dc:date>2022-02-22T10:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10964840#M48847</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is somehow unusual way of taking text height since you always have to pick some entity (and there is seldom need to change text sizes at every function repeat since it holds last value) but if you need it I hope this is it.&lt;/P&gt;
&lt;P&gt;If you don't select text entity you are asked to enter text height (here you have to enter a value before continuation).&lt;/P&gt;
&lt;P&gt;PS to exit function do not use ESC key since some object may stay highlighted.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(setq *txht* (getvar 'textsize))
(defun C:mynewarea 
	(/ *error* m e acsp adoc ar axss maxp minp obj p1 p2 pc1 pc2 pc3 per ss txts  txt2 txt3)
	(defun *error* ( msg )
		(if (not (member msg '("Function cancelled" "quit / exit abort")))
			(princ (strcat "\nError: " msg))
		)
		(if adoc (vla-endundomark adoc))
		(setvar 'cmdecho 1)
		(princ)
	)
	(defun set_text (tht / e m)
		(setq e (car (entsel (strcat "\nSelect TEXT to match heigh &amp;lt;" (rtos tht 2 2) "&amp;gt;: "))))
		(if e (setq m (vlax-get (vlax-ename-&amp;gt;vla-object e) 'Height)))
		(initget (+ 1 2 4))
		(if (not e)(setq m (getreal (strcat "\nSpecify TEXT height &amp;lt;" (rtos tht 2 2) "&amp;gt;: "))))
		m
	)
	(vl-load-com)
	(setq adoc (vla-get-activedocument(vlax-get-acad-object)))
	(vla-endundomark adoc)

	(if (and(= (getvar "tilemode") 0)(= (getvar "cvport") 1))
		(setq acsp (vla-get-paperspace adoc))
		(setq acsp (vla-get-modelspace adoc))
	)
	(vla-startundomark adoc)
	(setq m (set_text *txht*))
	(if (and m) (setq *txht* m))
	(cond ((and *txht*)

			(prompt "\n Select OBJECTS on screen to add area label")
			(if (setq ss (ssget))
				(progn
					(setq axss (vla-get-activeselectionset adoc))
					(vlax-for obj axss
						(if
							(and
								(not
									(vl-catch-all-error-p 
										(setq ar 
											(vl-catch-all-apply 
												(function (lambda() (vlax-curve-getarea obj)))
											)
										)
									)
								)
								(not
									(vl-catch-all-error-p 
										(setq per 
											(vl-catch-all-apply
												(function (lambda()(vlax-curve-getdistatparam obj (vlax-curve-getendparam obj))))
											)
										)
									)
								)
							)
							
							(progn
							    (setvar 'cmdecho 0)
								(vla-highlight obj :vlax-true)
								(setq
									txt2 (strcat "Area= " (rtos ar 2 2))
									txt3 (strcat "Perimeter= " (rtos per 2 2))
									pc1 (getpoint "\nPick Insertion point.")
									pc2 (mapcar '- pc1 (list 0 (* *txht* 1.5) 0))
									pc3 (mapcar '- pc2 (list 0 (* *txht* 1.5) 0))
								)
								(command "text" pc2 *txht* "" txt2)
								(command "text" pc3 *txht* "" txt3)
								(setvar 'cmdecho 1)
								(vla-highlight obj :vlax-false)
							)
						)
					)
				)
			)
		)
		(T (princ "\nEnter new text height by selecting text object!"))
	)
	(vla-endundomark adoc)
	(princ "\nDone!")
	(princ)
)
(princ "\n Type mynewarea to label objects with area and perimeter text")
(princ)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 12:27:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10964840#M48847</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2022-02-22T12:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10971326#M48848</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks again...&lt;/P&gt;&lt;P&gt;Everything working fine as expected&lt;/P&gt;&lt;P&gt;But it shows an error when I hit 'Enter' button to accept the previous vale. (see below video)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cad.png" style="width: 560px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1029620i51DD41F1B7ABA1FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cad.png" alt="cad.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 07:53:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10971326#M48848</guid>
      <dc:creator>Philip-John</dc:creator>
      <dc:date>2022-02-25T07:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10971686#M48849</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6613855"&gt;@Philip-John&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks again...&lt;/P&gt;
&lt;P&gt;Everything working fine as expected&lt;/P&gt;
&lt;P&gt;But it shows an error when I hit 'Enter' button to accept the previous vale. (see below video)&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I have tested code in any possible situation and it works as expected. Maybe it is not written the way I would do it myself, but since I took your code for modification it is fixed to some reasonable extent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you receive is a expected result. Function &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;initget&lt;/FONT&gt;&lt;/STRONG&gt; is stopping you to continue code execution as long as you don't have predefined text height (either by selection or entering). Code prevents you to hit enter in that case and asks you to define it. Global variable that holds text size is set to nil i.e. it is not initialized.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Save your code in separate file with extension .lst and assure that first line above the code is added to that file.&lt;/P&gt;
&lt;P&gt;(setq *txth* 2.5) - see the original code. For a first run you really need some value of text height to start with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you start learning autolisp (any CAD user should know at least the basics) and writing your code you will understand what I'm talking about.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS. Be regular with your responses (check forum regularly). When I see green circle on for two days and see no reply from OP I generally lose interest for that request. This all could have been resolved in one or two days.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 11:36:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10971686#M48849</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2022-02-25T11:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Modify this lisp please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10971808#M48850</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;Take your own time..&lt;/P&gt;&lt;P&gt;God bless..&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 13:02:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-this-lisp-please/m-p/10971808#M48850</guid>
      <dc:creator>Philip-John</dc:creator>
      <dc:date>2022-02-25T13:02:12Z</dc:date>
    </item>
  </channel>
</rss>

