<?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: AutoCAD Lisp to Pan a certain, stored distance. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/11093373#M56200</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8851114"&gt;@Michael.Traveller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;May l gently ask you if we can add some sort of new functions to it?&lt;/P&gt;
&lt;P&gt;1) move something a fixed distance&lt;/P&gt;
&lt;P&gt;2) move and pan a fixed distance&lt;/P&gt;
&lt;P&gt;3) copy-pattern for multiple distances (... to copy it from ground floor to F1 to F5, ... copies this block directly to the other floors which are equally distant by me).&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For 1) and 2), it was a simple-enough thing to add Move-oriented versions by editing the Copy-oriented ones -- see the attached &lt;STRONG&gt;CopyMovePanDist.lsp&lt;/STRONG&gt;&amp;nbsp;that adds those.&amp;nbsp; See the notes at the top of the file.&amp;nbsp; I changed the names of both the get-the-distance command and the global variable that holds that distance, adding the &lt;STRONG&gt;M&lt;/STRONG&gt; for &lt;STRONG&gt;M&lt;/STRONG&gt;ove.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's up to you to check/verify whether you already have any commands or aliases defined that are named the same as any of its command names, and if so, adjust something [you decide what] accordingly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For 3), ARRAY may do what you want, but I also attach something I've used for many years -- &lt;STRONG&gt;CopyAgain.lsp&lt;/STRONG&gt; with its &lt;STRONG&gt;CA&lt;/STRONG&gt; command.&amp;nbsp; It has you do a regular Copy operation [with or without pre-selection of objects], and then as many times as you hit Enter/Space, it makes another copy of the selection at the same distance and direction from the previous copy as the initial copy displacement.&amp;nbsp; Note that [as prompted] you need to hit &lt;STRONG&gt;ESC&lt;/STRONG&gt;ape [or pick something that includes that, such as a ribbon command icon] to end it -- typing in some other command name while CA's prompt is up will make another copy, rather than get into the command you typed.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Apr 2022 13:51:57 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2022-04-08T13:51:57Z</dc:date>
    <item>
      <title>AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10586888#M56181</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I work in HVAC and Pluming design where we have multiple floors, and l always have to pan a certain distance to jump between floors which are separated with a certain distance, "a".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Though, l am looking for a lisp which asks me the panning input distance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 09:08:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10586888#M56181</guid>
      <dc:creator>Michael.Traveller</dc:creator>
      <dc:date>2021-08-31T09:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10586923#M56182</link>
      <description>&lt;P&gt;Change the default vertical distance... 20 is now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:vpan nil

  (or *vp-dist*
      (setq *vp-dist* 20.))

  (if (setq *vp-dist* (cond ((getdist (strcat "\nSpecify vertical distance &amp;lt;" (rtos *vp-dist*) "&amp;gt;: ")))
			    (*vp-dist*)))
    (command "_.-pan" "_non" (list 0. *vp-dist*) "_non" '(0 0)))
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 09:25:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10586923#M56182</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-08-31T09:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10586936#M56183</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for this! Can we modify it so we can select if we want to pan up or down, instead of changing the pan distance between + and -?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 09:31:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10586936#M56183</guid>
      <dc:creator>Michael.Traveller</dc:creator>
      <dc:date>2021-08-31T09:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10586952#M56184</link>
      <description>&lt;P&gt;how about like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:vup nil
  (or *vp-dist* (c:vset))
  (command "_.-pan" "_non" (list 0. *vp-dist*) "_non" '(0 0))
  (princ)
  )

(defun c:vdo nil
  (or *vp-dist* (c:vset))
  (command "_.-pan" "_non" '(0 0) "_non" (list 0. *vp-dist*))
  (princ)
  )


(defun c:vset nil
  (or *vp-dist* 
      (setq *vp-dist* 20.))
  (setq *vp-dist* (cond ((getdist (strcat "\nSpecify vertical distance &amp;lt;" (rtos *vp-dist*) "&amp;gt;: ")))
			(*vp-dist*)))
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="gtx-trans" style="position: absolute; left: -80px; top: -19.2784px;"&gt;
&lt;DIV class="gtx-trans-icon"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 31 Aug 2021 09:41:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10586952#M56184</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-08-31T09:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587168#M56185</link>
      <description>&lt;P&gt;that's it, exactly!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you so much!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 11:34:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587168#M56185</guid>
      <dc:creator>Michael.Traveller</dc:creator>
      <dc:date>2021-08-31T11:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587174#M56186</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;Can this be modified to copy immediately something with the required incrementation?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 11:37:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587174#M56186</guid>
      <dc:creator>Michael.Traveller</dc:creator>
      <dc:date>2021-08-31T11:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587193#M56187</link>
      <description>&lt;P&gt;Sure, but think about the workflow...&lt;/P&gt;
&lt;P&gt;It could either work with this pan command, that you will have an option to Paste copied object at the current position... so you'll be jumping one flor after another.&lt;/P&gt;
&lt;P&gt;Or... if the increment match with the floor number, you could just specify a floor number or range of floors...&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 11:47:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587193#M56187</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-08-31T11:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587231#M56188</link>
      <description>&lt;P&gt;Yes exactly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, l need two things to ease my work:&lt;/P&gt;&lt;P&gt;- the first pan lisp which is working perfectly.&lt;/P&gt;&lt;P&gt;- another lisp that lets me select an object, and then copy-paste it to the other floor with the same distance of the floors difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: l need to see where a pipe will end up either in the upper or the lower floor. though l have to copy it from a base point and then select the displacement value. Having a lisp that immediately copy the object based on a set distance will do the trick!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 12:03:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587231#M56188</guid>
      <dc:creator>Michael.Traveller</dc:creator>
      <dc:date>2021-08-31T12:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587260#M56189</link>
      <description>&lt;P&gt;&lt;FONT size="3"&gt;Best that you put those on Tool Palettes.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Click click..&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 12:16:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587260#M56189</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2021-08-31T12:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587264#M56190</link>
      <description>&lt;P&gt;You're not answering my question. One way or another. Or the third option would be just set GRID to match your increment distance...&lt;/P&gt;
&lt;DIV id="gtx-trans" style="position: absolute; left: 321px; top: -19.2784px;"&gt;
&lt;DIV class="gtx-trans-icon"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 31 Aug 2021 12:19:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587264#M56190</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-08-31T12:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587272#M56191</link>
      <description>&lt;P&gt;Apologies!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can l kindly ask to have them both, so l can try and see which one will be more relevant? Thank you tons!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 12:22:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587272#M56191</guid>
      <dc:creator>Michael.Traveller</dc:creator>
      <dc:date>2021-08-31T12:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587381#M56192</link>
      <description>&lt;P&gt;Ok, I'll do that sometimes later unless someone else won't step in.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 13:02:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587381#M56192</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-08-31T13:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587403#M56193</link>
      <description>&lt;P&gt;thank you so much!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 13:12:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10587403#M56193</guid>
      <dc:creator>Michael.Traveller</dc:creator>
      <dc:date>2021-08-31T13:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10590105#M56194</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;... the third option would be just set GRID to (at least Y) match your increment distance...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you use the GRID? Would you try to set it up manually and test whether it makes the sense to you? Then we could automate it.&amp;nbsp;I can see advantages in this workflow...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Z9E3zK5E_0-1630491561694.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/959747iAF0C458745DC8CBF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Z9E3zK5E_0-1630491561694.png" alt="Z9E3zK5E_0-1630491561694.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 10:19:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10590105#M56194</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-09-01T10:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10590227#M56195</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;wrote:
&lt;P class="1630494873079"&gt;....&lt;/P&gt;
&lt;P&gt;Do you use the GRID? ...&amp;nbsp;I can see advantages in this workflow...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So can I, but not with just a GRID setting -- you would also want SNAP turned on:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kent1Cooper_0-1630494912444.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/959761iA271F4ED0EE77E8F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kent1Cooper_0-1630494912444.png" alt="Kent1Cooper_0-1630494912444.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 11:15:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10590227#M56195</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-09-01T11:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10590327#M56196</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp; It is not so practical as l draw lines within the same plan (floor), so it will be complex.&lt;/P&gt;&lt;P&gt;What l do is copying an object, and manually inserting the distance each time l want to copy something.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What could be useful is having a copy up, copy down, copy left, copy right and copy set, same as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;second lsp code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And a third one which is also useful would be able to copy and instantly pan to the new location at the same time ( mixing both codes!)&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 12:01:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10590327#M56196</guid>
      <dc:creator>Michael.Traveller</dc:creator>
      <dc:date>2021-09-01T12:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10590766#M56197</link>
      <description>&lt;P&gt;heres your 2nd and 3rd. You NEED to PRE-SELECT objects! Then you can repeat the command for how many floors you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:cup ( / s)
  (if (and (or (and (ssget "_I")
		    (setq s (ssget "_:L")))
	       (setq s *cup-s*)
	       (setq s (ssget "_:L")))
	   (or *vp-dist* (c:vset))
	   (setq e (entlast))
	   (setq *cup-s* (ssadd))
	   )
    (progn
      (command "_.copy" s "" "_non" '(0 0) "_non" (list 0. *vp-dist*))
      (while (setq e (entnext e))
	(ssadd e *cup-s*))))
  (princ)
  )

(defun c:cvup ( / s)
  (if (and (or (and (ssget "_I")
		    (setq s (ssget "_:L")))
	       (setq s *cup-s*)
	       (setq s (ssget "_:L")))
	   (or *vp-dist* (c:vset))
	   (setq e (entlast))
	   (setq *cup-s* (ssadd))
	   )
    (progn
      (command "_.copy" s "" "_non" '(0 0) "_non" (list 0. *vp-dist*))
      (command "_.-pan" "_non" (list 0. *vp-dist*) "_non" '(0 0))
      (while (setq e (entnext e))
	(ssadd e *cup-s*))))
  (princ)
  )
  &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 14:38:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10590766#M56197</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-09-01T14:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10590931#M56198</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8851114"&gt;@Michael.Traveller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;What could be useful is having a copy up, copy down, copy left, copy right and copy set....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And a third one which is also useful would be able to copy and instantly pan to the new location at the same time ( mixing both codes!)&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Here's my take on it.&amp;nbsp; There are commands for merely Panning in the different directions at the specified distance, for merely Copying, and for Copying and also Panning to the location of the copy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the Copying ones, you can have object(s) pre-selected or not; it ignores things on locked Layers in either case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I didn't think there was likely to be a single distance common enough to use as a predetermined initial default value, but that can be added easily.&amp;nbsp; It remembers your distance and offers it as default [only if it exists] so you can see what it was when you go to change it.&amp;nbsp; Use the &lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;getCPdist &lt;/FONT&gt;command to set a new one -- it will be called for you automatically the first time you use any of the commands if there's no distance set yet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used command names with &lt;EM&gt;two&lt;/EM&gt; &lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;C&lt;/FONT&gt;'s for the merely-Copy commands, because I already have a custom &lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;CL&lt;/FONT&gt; command and I use &lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;CR&lt;/FONT&gt; for CiRcle [changing the alias &lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;C&lt;/FONT&gt; to be for Copy].&amp;nbsp; And I used command names with &lt;EM&gt;two&lt;/EM&gt; &lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;P&lt;/FONT&gt;'s for the merely-Pan commands, because most of the combinations with one are already default aliases.&amp;nbsp; The &lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;C&lt;/FONT&gt;opy-and-&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;P&lt;/FONT&gt;an-to-the-location-of-the-copy commands start with &lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;CP&lt;/FONT&gt;&amp;nbsp;[only one each]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:getCPdist ()
  (initget (if *CPdist 6 7)); no zero, no negative, no Enter on first use
  (setq *CPdist
    (cond
      ( (getdist
          (strcat
            "\nCopy/Pan distance"
            (if *CPdist (strcat " &amp;lt;" (rtos *CPdist) "&amp;gt;") ""); in current Units mode/precision
            ": "
          ); strcat
        ); getdist
      ); User-input condition
      (*CPdist); prior value on Enter [when allowed]
    ); cond
  ); setq
  (princ)
); defun

(defun CDD (dir) ; = Copy at Direction and Distance
  (if (not *CPdist) (C:getCPdist))
  (command "_.copy"
    (cond
      ((ssget "_I") (ssget "_:L-I")); unlocked only among pre-selection if any
      ((ssget "_:L")); otherwise, unlocked only among new selection
    ); cond
    "" "_non" (polar '(0 0) dir *CPdist) ""
  ); command
  (princ)
); defun

(defun C:CCR () (CDD 0)); = Copy Right
(defun C:CCU () (CDD (/ pi 2))); = Copy Up
(defun C:CCL () (CDD pi)); = Copy Left
(defun C:CCD () (CDD (* pi 1.5))); = Copy Down

(defun PDD (dir); = Pan at Direction and Distance
  (command "_.-pan" "_non" (polar '(0 0) dir (- *CPdist)) "")
  (princ)
); defun

(defun C:PPR () (PDD 0)); = Pan Right
(defun C:PPU () (PDD (/ pi 2))); = Pan Up
(defun C:PPL () (PDD pi)); = Pan Left
(defun C:PPD () (PDD (* pi 1.5))); = Pan Down

(defun CPDD (dir); = Copy &amp;amp; Pan at Direction and Distance
  (CDD dir)
  (PDD dir)
  (princ)
); defun

(defun C:CPR () (CPDD 0)); = Copy &amp;amp; Pan Right
(defun C:CPU () (CPDD (/ pi 2))); = Copy &amp;amp; Pan Up
(defun C:CPL () (CPDD pi)); = Copy &amp;amp; Pan Left
(defun C:CPD () (CPDD (* pi 1.5))); = Copy &amp;amp; Pan Down&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 15:42:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/10590931#M56198</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-09-01T15:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/11093244#M56199</link>
      <description>&lt;P&gt;Hey!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies for forgetting to thank you!! It is late but l am grateful, you saved me crazy tons of time. This lisp is the best.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May l gently ask you if we can add some sort of new functions to it?&lt;/P&gt;&lt;P&gt;1) move something a fixed distance&lt;/P&gt;&lt;P&gt;2) move and pan a fixed distance&lt;/P&gt;&lt;P&gt;3) copy-pattern for multiple distances ( l mean, if l have a block, and l want to copy it from ground floor to F1 to F5, l would like to have a command that copies this block directly to the other floors which are equally distant by me).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much again!!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 12:43:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/11093244#M56199</guid>
      <dc:creator>Michael.Traveller</dc:creator>
      <dc:date>2022-04-08T12:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD Lisp to Pan a certain, stored distance.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/11093373#M56200</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8851114"&gt;@Michael.Traveller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;May l gently ask you if we can add some sort of new functions to it?&lt;/P&gt;
&lt;P&gt;1) move something a fixed distance&lt;/P&gt;
&lt;P&gt;2) move and pan a fixed distance&lt;/P&gt;
&lt;P&gt;3) copy-pattern for multiple distances (... to copy it from ground floor to F1 to F5, ... copies this block directly to the other floors which are equally distant by me).&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For 1) and 2), it was a simple-enough thing to add Move-oriented versions by editing the Copy-oriented ones -- see the attached &lt;STRONG&gt;CopyMovePanDist.lsp&lt;/STRONG&gt;&amp;nbsp;that adds those.&amp;nbsp; See the notes at the top of the file.&amp;nbsp; I changed the names of both the get-the-distance command and the global variable that holds that distance, adding the &lt;STRONG&gt;M&lt;/STRONG&gt; for &lt;STRONG&gt;M&lt;/STRONG&gt;ove.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's up to you to check/verify whether you already have any commands or aliases defined that are named the same as any of its command names, and if so, adjust something [you decide what] accordingly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For 3), ARRAY may do what you want, but I also attach something I've used for many years -- &lt;STRONG&gt;CopyAgain.lsp&lt;/STRONG&gt; with its &lt;STRONG&gt;CA&lt;/STRONG&gt; command.&amp;nbsp; It has you do a regular Copy operation [with or without pre-selection of objects], and then as many times as you hit Enter/Space, it makes another copy of the selection at the same distance and direction from the previous copy as the initial copy displacement.&amp;nbsp; Note that [as prompted] you need to hit &lt;STRONG&gt;ESC&lt;/STRONG&gt;ape [or pick something that includes that, such as a ribbon command icon] to end it -- typing in some other command name while CA's prompt is up will make another copy, rather than get into the command you typed.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 13:51:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-lisp-to-pan-a-certain-stored-distance/m-p/11093373#M56200</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2022-04-08T13:51:57Z</dc:date>
    </item>
  </channel>
</rss>

