<?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 Get difference between a chosen measurement and an inputed measurement in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12082950#M27517</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this lisp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:getdiffrence ()&lt;BR /&gt;(setq olddist (getpropertyvalue (ssname (ssget "_:S+.") 0) "Measurement"))&lt;BR /&gt;(setq diffrence (* -1 (- olddist (getdist "\nnew distance: "))))&lt;BR /&gt;(command "_mtext" pause pause diffrence "")&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone kindly adapt it to do the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Selected measurement is highlighted blue to donate it has been chosen&lt;/LI&gt;&lt;LI&gt;The position of the text is chosen on screen but the default font and size is as per the original measurement&lt;/LI&gt;&lt;LI&gt;The value (difference) is limited to 4 decimal places&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This would be much appreciated.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jul 2023 08:08:23 GMT</pubDate>
    <dc:creator>paul9ZMBV</dc:creator>
    <dc:date>2023-07-06T08:08:23Z</dc:date>
    <item>
      <title>Get difference between a chosen measurement and an inputed measurement</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12082950#M27517</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this lisp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:getdiffrence ()&lt;BR /&gt;(setq olddist (getpropertyvalue (ssname (ssget "_:S+.") 0) "Measurement"))&lt;BR /&gt;(setq diffrence (* -1 (- olddist (getdist "\nnew distance: "))))&lt;BR /&gt;(command "_mtext" pause pause diffrence "")&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone kindly adapt it to do the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Selected measurement is highlighted blue to donate it has been chosen&lt;/LI&gt;&lt;LI&gt;The position of the text is chosen on screen but the default font and size is as per the original measurement&lt;/LI&gt;&lt;LI&gt;The value (difference) is limited to 4 decimal places&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This would be much appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 08:08:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12082950#M27517</guid>
      <dc:creator>paul9ZMBV</dc:creator>
      <dc:date>2023-07-06T08:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get difference between a chosen measurement and an inputed measurement</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12083052#M27518</link>
      <description>&lt;P&gt;added the highlighting as well as 4 places for the decimal, but i dont know how to do the text thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:getdiffrence ()
  (setq olddist (getpropertyvalue (setq ss(ssname (ssget "_:S+." '((0 . "DIMENSION"))) 0)) "Measurement"))
  (redraw ss 3)
  (setq diffrence (rtos (* -1 (- olddist (getdist "\nnew distance: "))) 2 4))
  (command "_mtext" pause pause diffrence "")
  (redraw ss 4)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 06 Jul 2023 08:46:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12083052#M27518</guid>
      <dc:creator>EnM4st3r</dc:creator>
      <dc:date>2023-07-06T08:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Get difference between a chosen measurement and an inputed measurement</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12083115#M27519</link>
      <description>&lt;P&gt;Thanks works well, perhaps someone will jump in to add the matching formatting&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 09:19:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12083115#M27519</guid>
      <dc:creator>paul9ZMBV</dc:creator>
      <dc:date>2023-07-06T09:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get difference between a chosen measurement and an inputed measurement</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12083311#M27520</link>
      <description>&lt;LI-CODE lang="lisp"&gt;(defun c:getdiffrence (/ dim difference mtext_object)
	(sssetfirst)
	(while (and
				(setq dim (car (entsel "\nPick dimension: ")))
				(null (= "DIMENSION" (cdr (assoc 0 (entget dim)))))
		   )
	)
	(if dim
		(progn
			(sssetfirst nil (ssadd dim))
			(setq difference (abs (- (getpropertyvalue dim "Measurement") (getdist (cdr (assoc 13 (entget dim))) "\nnew distance: ")))
				  mtext_object (vla-addmtext (vla-get-block (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object))))
							   				 (vlax-3d-point (trans (getpoint (strcat "\nPick point for placing mtext difference &amp;lt;" (rtos difference 2 4) "&amp;gt;: ")) 1 0))
											 (vla-get-textheight (vlax-ename-&amp;gt;vla-object dim))
											 (rtos difference 2 4) 
							   )
			)
			(vla-put-stylename mtext_object (vla-get-textstyle (vlax-ename-&amp;gt;vla-object dim)))
			(vla-put-height mtext_object (vla-get-textheight (vlax-ename-&amp;gt;vla-object dim)))
		)
	)
	(sssetfirst)
	(princ)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 06 Jul 2023 11:01:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12083311#M27520</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2023-07-06T11:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get difference between a chosen measurement and an inputed measurement</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12083362#M27521</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916"&gt;@komondormrex&lt;/a&gt;&amp;nbsp; im trying to understand your code, while i do get most parts of it, i dont understand what the purpose of the "sssetfirst" functions is. Why do we need them?&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 06 Jul 2023 11:28:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12083362#M27521</guid>
      <dc:creator>EnM4st3r</dc:creator>
      <dc:date>2023-07-06T11:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get difference between a chosen measurement and an inputed measurement</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12083381#M27522</link>
      <description>&lt;P&gt;Thank you that's brilliant&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 11:35:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12083381#M27522</guid>
      <dc:creator>paul9ZMBV</dc:creator>
      <dc:date>2023-07-06T11:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get difference between a chosen measurement and an inputed measurement</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12083728#M27523</link>
      <description>&lt;P&gt;that is why. highlight with handles.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="komondormrex_0-1688650981074.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1237346i9E698598A6DAA840/image-size/medium?v=v2&amp;amp;px=400" role="button" title="komondormrex_0-1688650981074.png" alt="komondormrex_0-1688650981074.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="komondormrex_1-1688651024950.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1237348iEB15FBF48AF3B289/image-size/medium?v=v2&amp;amp;px=400" role="button" title="komondormrex_1-1688651024950.png" alt="komondormrex_1-1688651024950.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 13:44:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-difference-between-a-chosen-measurement-and-an-inputed/m-p/12083728#M27523</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2023-07-06T13:44:05Z</dc:date>
    </item>
  </channel>
</rss>

