<?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: LISP Request - Acre to Text in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850945#M67918</link>
    <description>&lt;P&gt;okay that worked and i tweaked the output to come out as 0.005 Acres+/- how would i set it to come out as ROMANS font at 10% the dimscale ive got other lisp with&amp;nbsp;(* 0.2 (getvar 'dimscale))) in it but im not sure where or how itd go in there&lt;/P&gt;</description>
    <pubDate>Fri, 06 Nov 2020 17:34:43 GMT</pubDate>
    <dc:creator>JohnC_ISM</dc:creator>
    <dc:date>2020-11-06T17:34:43Z</dc:date>
    <item>
      <title>LISP Request - Acre to Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850643#M67913</link>
      <description>&lt;P&gt;we use a lisp to get the acreage of a poly-line for when we measure lot sizes. if possible could someone add extra steps into the routine to take the acreage displayed and automatically create a text with +/- after it at 7.5% of the current scale and certain layer. for example the image&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(DEFUN C:AC ( / PLATE SS1 COUNT EMAX)&lt;BR /&gt;(WHILE&lt;BR /&gt;(NOT (SETQ PLATE&lt;BR /&gt;(ENTSEL "\Pick entity for area: "))))&lt;BR /&gt;(COMMAND "_.AREA" "_E" PLATE "")&lt;BR /&gt;(COMMAND "" "")&lt;BR /&gt;(SETQ AA (GETVAR "AREA"))&lt;BR /&gt;(PROMPT (STRCAT " AREA "&lt;BR /&gt;(RTOS (GETVAR "AREA" ) 2)&lt;BR /&gt;" S.F."))&lt;BR /&gt;&lt;BR /&gt;(PROMPT (STRCAT " ACRES "&lt;BR /&gt;(RTOS (/ AA 43560) 2)&lt;BR /&gt;" AC."))&lt;BR /&gt;(PRINC)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 15:26:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850643#M67913</guid>
      <dc:creator>JohnC_ISM</dc:creator>
      <dc:date>2020-11-06T15:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Request - Acre to Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850758#M67914</link>
      <description>&lt;P&gt;A Search of this Forum will find routines to label lot outlines with acres.&amp;nbsp; [Some require picking an object such as a Polyline, some only picking inside an area, some label with square feet &lt;EM&gt;and&lt;/EM&gt;&amp;nbsp; acres, some with other features, most include setting a Layer and text Style, some place the label in the middle and some ask the User where to put it, etc.]&amp;nbsp; Any of them could be easily modified to set the height as you want it instead of whatever they originally use, and to add the plus-or-minus at the end.&amp;nbsp; If you find one that does what you want but just needs those modifications, post it and we can suggest adjustments.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 16:18:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850758#M67914</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-11-06T16:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Request - Acre to Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850840#M67915</link>
      <description>&lt;P&gt;i looked and found this but the command line box pops up and says invalid . its trying insert something and idk why. i just want it to make mtext out of the acreage data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(Defun C:AREAT ()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(setvar "CMDECHO" 0 )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(SETQ SS (entsel "Select Object To Get Area of:"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(PROGN (COMMAND "AREA" "o" SS))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(SETQ SQF2 (/ (GETVAR "AREA") 1)) ;decimal&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(setq ACRE2 (cvunit SQF2 "sq feet" "acres"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(setq SQYD2 (cvunit SQF2 "sq feet" "sq yard"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(setq SQMT2 (cvunit SQF2 "sq feet" "sq meter"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(setq HECT2 (cvunit SQF2 "sq feet" "hectare"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(princ&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(strcat "\n Decimal Scale"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"\n"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"\n Square Feet = " (rtos SQF2 2 2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"\n Acres = " (rtos ACRE2 2 3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"\n"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;) ;put up alert box&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(PRINC)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(setq pt (getpoint "Specify Insertion Point"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(command "insert" "darea" pt 1 1 0 "Area" (strcat (rtos SQF2 2 2) " SF") (strcat (rtos ACRE2 2 3) " AC"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 16:33:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850840#M67915</guid>
      <dc:creator>JohnC_ISM</dc:creator>
      <dc:date>2020-11-06T16:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Request - Acre to Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850916#M67916</link>
      <description>&lt;LI-CODE lang="lisp"&gt;(Defun C:AREAT ( / ss sqf2 acre2 sqyd2 hect2 pt)
(setq ss (entsel "\nSelect Object To Get Area of: "))
(if ss
	(progn 
	(command "AREA" "o" SS)
	(setq sqf2 (/ (getvar 'AREA) 1)) ;decimal
	(setq acre2 (cvunit sqf2 "sq feet" "acres"))
	(setq sqyd2 (cvunit sqf2 "sq feet" "sq yard"))
	(setq sqmt2 (cvunit sqf2 "sq feet" "sq meter"))
	(setq hect2 (cvunit sqf2 "sq feet" "hectare"))
	(princ
	(strcat "\n Decimal Scale"
	"\n"
	"\n Square Feet = " (rtos sqf2 2 2)
	"\n Acres = " (rtos acre2 2 3)
	"\n"
	)
	) 
	(PRINC)
	(setq pt (getpoint "Specify Insertion Point"))
	(entmake
		(list
		(cons 0 "MTEXT") 
		(cons 100 "AcDbEntity")
		(cons 100 "AcDbMText")
		(cons 1 (strcat "Area = " (rtos sqf2 2 2) " SF " (rtos acre2 2 3) " AC"))
		(cons 10 pt)   ; Insertion Point
		)
	   )
	(princ)
	)
)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 06 Nov 2020 17:15:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850916#M67916</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-11-06T17:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Request - Acre to Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850929#M67917</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2832802"&gt;@JohnC_ISM&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... its trying insert something and idk why. ....&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(command "insert" "darea" pt 1 1 0 "Area" (strcat (rtos SQF2 2 2) " SF") (strcat (rtos ACRE2 2 3) " AC"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Because that one does it by means of a Block with Attributes.&amp;nbsp; If&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;'s suggestion in Message 4 doesn't do what you want, describe what you would like to be different.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 17:25:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850929#M67917</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-11-06T17:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Request - Acre to Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850945#M67918</link>
      <description>&lt;P&gt;okay that worked and i tweaked the output to come out as 0.005 Acres+/- how would i set it to come out as ROMANS font at 10% the dimscale ive got other lisp with&amp;nbsp;(* 0.2 (getvar 'dimscale))) in it but im not sure where or how itd go in there&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 17:34:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850945#M67918</guid>
      <dc:creator>JohnC_ISM</dc:creator>
      <dc:date>2020-11-06T17:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Request - Acre to Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850983#M67919</link>
      <description>&lt;LI-CODE lang="general"&gt;(Defun C:AREAT ( / ss sqf2 acre2 sqyd2 hect2 pt)
(setq ss (entsel "\nSelect Object To Get Area of: "))
(if ss
	(progn 
	(command "AREA" "o" SS)
	(setq sqf2 (/ (getvar 'AREA) 1)) ;decimal
	(setq acre2 (cvunit sqf2 "sq feet" "acres"))
	(setq sqyd2 (cvunit sqf2 "sq feet" "sq yard"))
	(setq sqmt2 (cvunit sqf2 "sq feet" "sq meter"))
	(setq hect2 (cvunit sqf2 "sq feet" "hectare"))
	(princ
	(strcat "\n Decimal Scale"
	"\n"
	"\n Square Feet = " (rtos sqf2 2 2)
	"\n Acres = " (rtos acre2 2 3)
	"\n"
	)
	) 
	(PRINC)
	(setq pt (getpoint "Specify Insertion Point"))
	(entmake
		(list
		(cons 0 "MTEXT") 
		(cons 100 "AcDbEntity")
		(cons 100 "AcDbMText")
		(cons 40 (* 0.1 (getvar 'dimscale)))
		(cons 7 "Romans")
		(cons 1 (strcat "Area = " (rtos sqf2 2 2) " SF " (rtos acre2 2 3) " AC"))
		(cons 10 pt)   ; Insertion Point
		)
	   )
	(princ)
	)
)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For MTEXT DXF codes consult &lt;A href="http://docs.autodesk.com/ACD/2011/ENU/filesDXF/WS1a9193826455f5ff18cb41610ec0a2e719-79f8.htm" target="_blank" rel="noopener"&gt;this&lt;/A&gt; link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To use ROMANS font create text style Romans with font Romans used. Apply for other fonts&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 17:54:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850983#M67919</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-11-06T17:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Request - Acre to Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850993#M67920</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2832802"&gt;@JohnC_ISM&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;okay that worked and i tweaked the output to come out as 0.005 Acres+/- &lt;STRONG&gt;how would i set it to come out as ROMANS font at 10% the dimscale ive got other lisp with&amp;nbsp;(* 0.2 (getvar 'dimscale))) in it but im not sure where or how itd go in there&lt;/STRONG&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Here's are the entmake mods for your text:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(entmake (list '(0 . "MTEXT")
	       '(100 . "AcDbEntity")
	       '(100 . "AcDbMText")
	       (cons 1 (strcat "Area = " (rtos sqf2 2 2) " SF " (rtos acre2 2 3) " AC"))
	       '(8 . "MtextLayer")	; Layer
	       (cons 10 pt)		; Insertion Point
	       (cons 40 (* 0.1 (getvar 'dimscale))) ; Height 10% of dimscale
	       (cons 7
		     (if (tblobjname "style" "Romans")
		       "Romans"
		       "Standard"
		     )
	       )			; Style .. check that it exists
	 )
)&lt;/LI-CODE&gt;&lt;P&gt;*oops too slow .. will leave as is for reference.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 18:02:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850993#M67920</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2020-11-06T18:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Request - Acre to Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850995#M67921</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;To use ROMANS font create text style Romans with font Romans used. Apply for other fonts&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2832802"&gt;@JohnC_ISM&lt;/a&gt;, you can use &lt;EM&gt;any&lt;/EM&gt;&amp;nbsp; name for the Style, as long as the font you want is assigned to it [you may have one already defined].&amp;nbsp; Just be aware that it is the &lt;EM&gt;Style&lt;/EM&gt;&amp;nbsp; name, not the &lt;EM&gt;Font&lt;/EM&gt;&amp;nbsp; name, that goes into the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, as an aside, I wouldn't bother using Mtext for this.&amp;nbsp; The &lt;STRONG&gt;M&lt;/STRONG&gt; stands for &lt;STRONG&gt;M&lt;/STRONG&gt;ulti-line -- if you're doing only one line, use plain Text.&amp;nbsp; Only if you want more than one line in one object, such as to show square feet and acres on separate lines, or if you need stacked fractions, or if you want to change some property of only part of the contents [such as some characters in a different color], is there any reason to use Mtext.&amp;nbsp; [And plain Text uses slightly less memory for single-line content.]&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 18:28:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-acre-to-text/m-p/9850995#M67921</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-11-06T18:28:55Z</dc:date>
    </item>
  </channel>
</rss>

