<?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 Code Additional Help! in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8643918#M95647</link>
    <description>&lt;P&gt;Dbhunia , I'd like to increase the Decimal units Precision&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;prior to it prompting "Select two points on Image" to two significant digits (0.00) during the command, and return to our standard precision of (0) after the command is ran if you could please help.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Mar 2019 20:01:33 GMT</pubDate>
    <dc:creator>Kyle.Pederson</dc:creator>
    <dc:date>2019-03-07T20:01:33Z</dc:date>
    <item>
      <title>Lisp Code Additional Help!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8452672#M95635</link>
      <description>&lt;P&gt;I have a code that someone has created for me, but have yet to hear from them anymore with a few tweaks to it. Hoping someone can help. Program is for inserting Google Map Images, Scale and Rotate them.&lt;/P&gt;
&lt;P&gt;Currently the program is set to where you need to insert them Google Map Image prior to running to command. I'd like to have the attach command implemented into the code. Following that the rotate command in the code is wanting me to select 2 points that will be horizontal, at times the image doesn't need to be rotated and I'd like an option to rotate or not. Lastly, If you exit out of the command midway thru, all preselected object snaps are lost. How can I keep that from happening? Thanks for any help you guys can provide.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;;;;--- App to insert a google image, scale and rotate

(defun C:GM()
  (setq oldEcho(getvar "cmdecho"))
  (setq oldSnap(getvar "osmode"))
  (setvar "cmdecho" 0)
  (setvar "osmode" 0)
  (setq dist(getdist "\n Select two points on image to measure: "))
  (setq gdist(getdist "\n Google Dimension: "))
  (setq en(car(entsel "\n Select image: ")))
  (command "scale" en "" (list 0 0 0) (/ gdist dist))
  (command "zoom" "extents")
  (setq ang(getangle "\n Select two points to be horizontal: "))
  (command "rotate" en "" (list 0 0 0) (angtos (- ang ang ang) 1 8))
  (setvar "osmode" oldSnap)
  (setvar "cmdecho" oldEcho)
  (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Dec 2018 13:43:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8452672#M95635</guid>
      <dc:creator>Kyle.Pederson</dc:creator>
      <dc:date>2018-12-07T13:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Code Additional Help!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8452830#M95636</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5840716"&gt;@Kyle.Pederson&lt;/a&gt;&amp;nbsp;hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is my&amp;nbsp; fix to MG command&lt;/P&gt;
&lt;P&gt;something about the rotate calc was weird to me so i put it on remark and added my version to it so test it if it's ok.&lt;/P&gt;
&lt;P&gt;about osnap...if you want to break in mid function just press enter instead of esc, this will preserve your osnap settings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;enjoy&lt;/P&gt;
&lt;P&gt;moshe&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun C:GM (/ oldEcho oldSnap dist gdist en ang)
  (setq oldEcho(getvar "cmdecho"))
  (setq oldSnap(getvar "osmode"))
  (setvar "cmdecho" 0)
  (setvar "osmode" 0)
  
  (if (and
	(setq dist (getdist "\nSelect two points on image to measure: "))
        (setq gdist (getdist "\nGoogle Dimension: "))
        (setq en (car (entsel "\nSelect image: ")))
      )
   (progn
    (command "scale" en "" (list 0 0 0) (/ gdist dist))
    (command "zoom" "extents")
    
    (if (setq ang (getangle "\nSelect two points to be horizontal: "))
    ; (command "rotate" en "" (list 0 0 0) (angtos (- ang ang ang) 1 8))
     (command "rotate" en "" (list 0 0 0) (angtos (* -1 ang) 1 8))
    )
   ); progn
  ); if
  
  (setvar "osmode" oldSnap)
  (setvar "cmdecho" oldEcho)
  (princ)
)

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 14:33:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8452830#M95636</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2018-12-07T14:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Code Additional Help!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8453917#M95637</link>
      <description>&amp;gt;&amp;gt;&amp;gt; (* -1 ang)&lt;BR /&gt;=&lt;BR /&gt;(- ang)&lt;BR /&gt;&lt;BR /&gt;???&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Dec 2018 23:14:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8453917#M95637</guid>
      <dc:creator>scot-65</dc:creator>
      <dc:date>2018-12-07T23:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Code Additional Help!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8453948#M95638</link>
      <description>Allow the user to keep the OSNAP as is and follow Moshe's&lt;BR /&gt;handling of user input before executing.&lt;BR /&gt;&lt;BR /&gt;I would suggest to rework [remove] the getangle statement as this is also user input:&lt;BR /&gt;(setq ang&lt;BR /&gt; (if (not (setq p1 (getpoint "Specify first point of angle &amp;lt;0&amp;gt;: ")))&lt;BR /&gt;  0&lt;BR /&gt;  (angle p1 (getpoint "Specify second point: "))&lt;BR /&gt; );if&lt;BR /&gt;);setq&lt;BR /&gt;Place the above inside the "and".&lt;BR /&gt;*unverified*&lt;BR /&gt;&lt;BR /&gt;Once the user input is satisfied (which means you entered into PROGN),&lt;BR /&gt;it is at this time to tinker with the OSNAP setting [if required].&lt;BR /&gt;...and CMDECHO.&lt;BR /&gt;&lt;BR /&gt;Suggest adding 16384 to the OSNAP value as this will temporarily&lt;BR /&gt;suppress the OSNAP. At the end, subtract.&lt;BR /&gt;If the program errors out, one can simply select the icon in the tray area&lt;BR /&gt;to turn back on.&lt;BR /&gt;&lt;BR /&gt;;set:&lt;BR /&gt;(if (&amp;lt; (getvar "OSMODE") 16384) (setvar "OSMODE" (+ (getvar "OSMODE") 16384)))&lt;BR /&gt;;reset (and inside *error*):&lt;BR /&gt;(if (&amp;gt; (getvar "OSMODE") 16384) (setvar "OSMODE" (- (getvar "OSMODE") 16384)))&lt;BR /&gt;&lt;BR /&gt;During development of tools, and the program subsequently errors out, these bits&lt;BR /&gt;of code will auto-correct OSMODE.&lt;BR /&gt;&lt;BR /&gt;???&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Dec 2018 23:46:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8453948#M95638</guid>
      <dc:creator>scot-65</dc:creator>
      <dc:date>2018-12-07T23:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Code Additional Help!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8461385#M95639</link>
      <description>&lt;P&gt;I haven't been able to test yet, but wouldn't doing below ask for the points and rotate based on the not correctly scaled image? I'd like to have the image scaled appropriately, and then either have the option to keep the current image without&amp;nbsp;rotation or allow to pick 2 points of the correctly scaled image based on the Google Dimension to rotate horizontal (0 Degrees)&lt;/P&gt;
&lt;PRE&gt;(setq ang
 (if (not (setq p1 (getpoint "Specify first point of angle &amp;lt;0&amp;gt;: ")))
 0
 (angle p1 (getpoint "Specify second point: "))
 );if
);setq
Place the above inside the "and".&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Dec 2018 22:09:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8461385#M95639</guid>
      <dc:creator>Kyle.Pederson</dc:creator>
      <dc:date>2018-12-11T22:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Code Additional Help!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8461442#M95640</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5840716"&gt;@Kyle.Pederson&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, I am going to HIGHLY recommend that you look into the &lt;A href="https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/AutoCAD-Core/files/GUID-D0FA10D5-76EE-4B80-A285-43C7F39916DB-htm.html" target="_blank"&gt;ALIGN&lt;/A&gt;&amp;nbsp;command. This will do most of the heavy lifting for you. It will Move, Scale and Rotate your object all in one command. Here is some lisp syntax:&lt;/P&gt;
&lt;PRE&gt;(setq e (ensetl "\nSelect object to align: ")
(setq p1 (getpoint))
(setq p1new (getpoint))
(setq p2 (getpoint))
(setq p2new (getpoint))
(command "_.ALIGN" e "" p1 p1new p2 p2new "" "y")&lt;/PRE&gt;
&lt;P&gt;Second, implementing an error handler, such as one of the ones &lt;A href="http://www.lee-mac.com/errorhandling.html" target="_blank"&gt;Lee Mac&lt;/A&gt;&amp;nbsp;has provided, will very easily reset your variables that have been changed. Since setting your variables is the first thing you do, this will work fine. See implemented example (note I have added the *error* as a local variable:&lt;/P&gt;
&lt;PRE&gt;(defun C:GM( / *error* )

    (defun *error* ( msg )
	(setvar "cmdecho" oldEcho)
	(setvar "osmode" oldSnap)
        (if (not (member msg '("Function cancelled" "quit / exit abort")))
            (princ (strcat "\nError: " msg))
        )
        (princ)
    )

  (setq oldEcho(getvar "cmdecho"))
  (setq oldSnap(getvar "osmode"))
  (setvar "cmdecho" 0)
  (setvar "osmode" 0)&lt;BR /&gt;;.............................................&lt;/PRE&gt;
&lt;P&gt;Third, while I am not directly providing you with a solution, it is good practice to keep your local variables defined so that less chance for errors can occur. Like so:&lt;/P&gt;
&lt;PRE&gt;(defun C:GM( / *error* oldEcho oldSnap dist gdist en ang)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this has been beneficial to you.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;~DD&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>Tue, 11 Dec 2018 22:37:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8461442#M95640</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2018-12-11T22:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Code Additional Help!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8462615#M95641</link>
      <description>&lt;P&gt;For error handling do as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5680873"&gt;@CodeDing&lt;/a&gt;&amp;nbsp;said..... and for the rest try this.......&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun C:GM (/ *error* oldEcho oldSnap dist gdist en ang sc p1)

  (defun *error* ( msg )
	(setvar "cmdecho" oldEcho)
	(setvar "osmode" oldSnap)
        (if (not (member msg '("Function cancelled" "quit / exit abort")))
            (princ (strcat "\nError: " msg))
        )
  (princ)
  )
  (setq oldEcho(getvar "cmdecho"))
  (setq oldSnap(getvar "osmode"))
  (setvar "cmdecho" 0)
  (setvar "osmode" 0)

  (if (and
	(setq dist (getdist "\nSelect two points on image to measure: "))
        (setq gdist (getdist "\nGoogle Dimension: "))
        (setq en (car (entsel "\nSelect image: ")))
      )

      (progn
    	(command "scale" en "" (list 0 0 0) (/ gdist dist))
    	(command "zoom" "extents")
    	(initget "Y N")
    	(setq sc
	   (cond
	  	((getkword "\nWant to Rotate the Image [Yes / No] &amp;lt;No&amp;gt; : "))
	  	("N")
	   )
    	)
    
    	(if (= sc "Y")
          (progn
	     (setq ang
 		(if (not (setq p1 (getpoint "\nSpecify first point of angle &amp;lt;0&amp;gt;: ")))
 			0
 		        (angle p1 (getpoint p1 "Specify second point: "))
 		);if
	     );setq
    	     (command "rotate" en "" (list 0 0 0) (angtos ang))
	  )
       	)
      ); progn
  ); if
  
  (setvar "osmode" oldSnap)
  (setvar "cmdecho" oldEcho)
  (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Dec 2018 12:47:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8462615#M95641</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2018-12-12T12:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Code Additional Help!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8462901#M95642</link>
      <description>&lt;P&gt;Thanks Dbhunia! the choice between rotating and not rotating is exactly what I was looking for. I did however change one line. from:&lt;/P&gt;
&lt;PRE&gt;(command "rotate" en "" (list 0 0 0) (angtos ang))
&lt;/PRE&gt;
&lt;P&gt;to this:&lt;/P&gt;
&lt;PRE&gt;(command "rotate" en "" (list 0 0 0) (angtos (* -1 ang) 1 8))&lt;/PRE&gt;
&lt;P&gt;Your line was doubling the angle, and not bring it to 0 degrees (Horizontal)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did have a question regarding how to add (Command "Attach" with a Scale of 1 and insertion point of 0,0,0 to the beginning of the code so I don't have this two step process of attaching image before running the command.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 14:12:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8462901#M95642</guid>
      <dc:creator>Kyle.Pederson</dc:creator>
      <dc:date>2018-12-12T14:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Code Additional Help!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8462946#M95643</link>
      <description>&lt;P&gt;Give me 2 hour.... I am on the way to home.....after reaching home I can help you. .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I am operating from mobile.....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Inbetween this check this.....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/image-attach-lisp/td-p/4414723" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/image-attach-lisp/td-p/4414723&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You shall get your solution.....otherwise ask..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 14:37:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8462946#M95643</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2018-12-12T14:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Code Additional Help!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8463210#M95644</link>
      <description>&lt;P&gt;Try this...... (Tested in AutoCAD 2007 hopefully will run in upper version)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun C:GM (/ *error* oldEcho oldSnap dist gdist en ang sc p1); image)

  (defun *error* ( msg )
	(setvar "cmdecho" oldEcho)
	(setvar "osmode" oldSnap)
        (if (not (member msg '("Function cancelled" "quit / exit abort")))
            (princ (strcat "\nError: " msg))
        )
  (princ)
  )
  (setq oldEcho(getvar "cmdecho"))
  (setq oldSnap(getvar "osmode"))
  (setvar "cmdecho" 0)
  (setvar "osmode" 0)

  (if
    (setq image (getfiled "Select image" (getvar 'dwgprefix) "gif;jpg;png;tif" 8))
    (command "._undo" "_end" "._undo" "_begin" "._-image" "_attach"
              image '(0 0 0) 1.0 0.0 "._undo" "_end"
    )
  )

  (if (and
	(/= image nil)
	(setq en (entlast))
	(setq dist (getdist "\nSelect two points on image to measure: "))
        (setq gdist (getdist "\nGoogle Dimension: "))
	;(setq en (car (entsel "\nSelect image: ")))
      )

      (progn
    	(command "scale" en "" (list 0 0 0) (/ gdist dist))
    	(command "zoom" "extents")
    	(initget "Y N")
    	(setq sc
	   (cond
	  	((getkword "\nWant to Rotate the Image [Yes / No] &amp;lt;No&amp;gt; : "))
	  	("N")
	   )
    	)
    
    	(if (= sc "Y")
          (progn
	     (setq ang
 		(if (not (setq p1 (getpoint "\nSpecify first point of angle &amp;lt;0&amp;gt;: ")))
 			0
 		        (angle p1 (getpoint p1 "Specify second point: "))
 		);if
	     );setq
    	     ;(command "rotate" en "" (list 0 0 0) (angtos ang))
	     (command "rotate" en "" (list 0 0 0) (angtos (* -1 ang) 1 8))
	  )
       	)
      ); progn
  ); if
  
  (setvar "osmode" oldSnap)
  (setvar "cmdecho" oldEcho)
  (princ)
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 15:47:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8463210#M95644</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2018-12-12T15:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Code Additional Help!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8463652#M95645</link>
      <description>&lt;P&gt;Fantastic! Currently it's preset to look through "My Documents" Folder. Can I change the preset&amp;nbsp;to open up a folder of my choosing in the code?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 17:57:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8463652#M95645</guid>
      <dc:creator>Kyle.Pederson</dc:creator>
      <dc:date>2018-12-12T17:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Code Additional Help!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8463719#M95646</link>
      <description>&lt;P&gt;suppose you have a folder at "C:\Final\XXX".........(your destination folder)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then change the line.....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(setq image (getfiled "Select image" (getvar 'dwgprefix) "gif;jpg;png;tif" 8))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(setq image (getfiled "Select image" "C:\\Final\\XXX\\" "gif;jpg;png;tif" 8))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good night here it's 12 o'clock....... Talk tomorrow...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 18:26:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8463719#M95646</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2018-12-12T18:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Code Additional Help!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8643918#M95647</link>
      <description>&lt;P&gt;Dbhunia , I'd like to increase the Decimal units Precision&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;prior to it prompting "Select two points on Image" to two significant digits (0.00) during the command, and return to our standard precision of (0) after the command is ran if you could please help.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 20:01:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8643918#M95647</guid>
      <dc:creator>Kyle.Pederson</dc:creator>
      <dc:date>2019-03-07T20:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Code Additional Help!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8644672#M95648</link>
      <description>&lt;P&gt;Try this.......&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun C:GM (/ *error* oldEcho oldSnap &lt;FONT color="#0000FF"&gt;olddecimal&lt;/FONT&gt; dist gdist en ang sc p1)

  (defun *error* ( msg )
	(setvar "cmdecho" oldEcho)
	(setvar "osmode" oldSnap)
	&lt;FONT color="#0000FF"&gt;(setvar "LUPREC" olddecimal)&lt;/FONT&gt;
        (if (not (member msg '("Function cancelled" "quit / exit abort")))
            (princ (strcat "\nError: " msg))
        )
  (princ)
  )
  (setq oldEcho(getvar "cmdecho"))
  (setq oldSnap(getvar "osmode"))
  &lt;FONT color="#0000FF"&gt;(setq olddecimal(getvar "LUPREC"))&lt;/FONT&gt;
  (setvar "cmdecho" 0)
  (setvar "osmode" 0)
  &lt;FONT color="#0000FF"&gt;(setvar "LUPREC" 2)&lt;/FONT&gt;

  (if
    (setq image (getfiled "Select image" (getvar 'dwgprefix) "gif;jpg;png;tif" 8))
    (command "._undo" "_end" "._undo" "_begin" "._-image" "_attach"
              image '(0 0 0) 1.0 0.0 "._undo" "_end"
    )
  )

  (if (and
	(/= image nil)
	(setq en (entlast))
	(setq dist (getdist "\nSelect two points on image to measure: "))
        (setq gdist (getdist "\nGoogle Dimension: "))
	;(setq en (car (entsel "\nSelect image: ")))
      )

      (progn
    	(command "scale" en "" (list 0 0 0) (/ gdist dist))
    	(command "zoom" "extents")
    	(initget "Y N")
    	(setq sc
	   (cond
	  	((getkword "\nWant to Rotate the Image [Yes / No] &amp;lt;No&amp;gt; : "))
	  	("N")
	   )
    	)
    
    	(if (= sc "Y")
          (progn
	     (setq ang
 		(if (not (setq p1 (getpoint "\nSpecify first point of angle &amp;lt;0&amp;gt;: ")))
 			0
 		        (angle p1 (getpoint p1 "Specify second point: "))
 		);if
	     );setq
    	     ;(command "rotate" en "" (list 0 0 0) (angtos ang))
	     (command "rotate" en "" (list 0 0 0) (angtos (* -1 ang) 1 8))
	  )
       	)
      ); progn
  ); if
  
  (setvar "osmode" oldSnap)
  (setvar "cmdecho" oldEcho)
  &lt;FONT color="#0000FF"&gt;(setvar "LUPREC" olddecimal)&lt;/FONT&gt;
  (princ)
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 05:32:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-code-additional-help/m-p/8644672#M95648</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2019-03-08T05:32:57Z</dc:date>
    </item>
  </channel>
</rss>

