<?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: Quick copy with spacing - LISP in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133655#M26302</link>
    <description>&lt;P&gt;And can't the ARRAY command do this job?&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jul 2023 14:25:42 GMT</pubDate>
    <dc:creator>CADaSchtroumpf</dc:creator>
    <dc:date>2023-07-28T14:25:42Z</dc:date>
    <item>
      <title>Quick copy with spacing - LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133402#M26298</link>
      <description>&lt;P&gt;Hello guys, I found awesome&amp;nbsp;video with lisp who can easy create multiple copy of object with spacing only with move with mouse.&lt;/P&gt;&lt;P&gt;Can you guys create something like this? Will be great if will be possible create copy in any direction, any spacing (Pick this spacing from drawing).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6332001020112w960h540r247" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6332001020112" data-account="6057940548001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6057940548001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6332001020112w960h540r247');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://forums.autodesk.com/t5/video/gallerypage/video-id/6332001020112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916"&gt;@komondormrex&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;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 12:41:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133402#M26298</guid>
      <dc:creator>Lukasvop1</dc:creator>
      <dc:date>2023-07-28T12:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Quick copy with spacing - LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133438#M26299</link>
      <description>&lt;P&gt;sure thing)&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 12:51:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133438#M26299</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2023-07-28T12:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Quick copy with spacing - LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133555#M26300</link>
      <description>&lt;P&gt;I have something at least very similar, called &lt;STRONG&gt;CopyAgain.lsp&lt;/STRONG&gt; with its &lt;STRONG&gt;CA&lt;/STRONG&gt; command, &lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/repeat-copy-and-displacement/m-p/2202376/highlight/true#M257134" target="_blank" rel="noopener"&gt;&amp;gt;here&amp;lt;&lt;/A&gt;.&amp;nbsp; It doesn't do the number of copies &lt;EM&gt;drag&lt;/EM&gt;-wise as in your video, but it's close -- you choose what you want to Copy, and specify the displacement by any method the command accepts, and then you hit Enter/space as many times as you want, and with each one it makes another copy of the object(s), displaced at the same distance and direction from the previous copy.&amp;nbsp; ESCape ends the repeating Copying.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CopyAgain.gif" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1246419i7ACC9517EB1EDB98/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CopyAgain.gif" alt="CopyAgain.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 13:44:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133555#M26300</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-07-28T13:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Quick copy with spacing - LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133620#M26301</link>
      <description>&lt;P&gt;Thank you Kent, I appreciate your response but when I need copy object 30 times and next one x times and so on.. I will broke my enter key.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 14:09:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133620#M26301</guid>
      <dc:creator>Lukasvop1</dc:creator>
      <dc:date>2023-07-28T14:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Quick copy with spacing - LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133655#M26302</link>
      <description>&lt;P&gt;And can't the ARRAY command do this job?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 14:25:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133655#M26302</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2023-07-28T14:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Quick copy with spacing - LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133675#M26303</link>
      <description>&lt;P&gt;Nope, but this should be in Array function default, this thing missing here.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 14:37:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133675#M26303</guid>
      <dc:creator>Lukasvop1</dc:creator>
      <dc:date>2023-07-28T14:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Quick copy with spacing - LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133711#M26304</link>
      <description>&lt;P&gt;here goes a quick shot for your evaluation) need tuning thou.&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;;****************************************************************************************************************************

;	komondormrex, jul 2023

;****************************************************************************************************************************

(defun crd (in_list)
	(reverse (cdr (reverse in_list)))
)

;****************************************************************************************************************************

(defun c:dynamic_multiple_copy (/ copy_index command_finished original_copy_instance copied_set base_point second_point
				  copy_distance error_ocurred copied_point current_copy_index
			       )
	(setq copy_index 0
		  original_copy_instance (mapcar 'vlax-ename-&amp;gt;vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex (ssget)))))
		  copied_set (list (list copy_index original_copy_instance))
		  base_point (getpoint "\nPick base point: ")
		  second_point (getpoint base_point "\nPick second point: ")
		  copy_distance (distance base_point second_point)
	)
	(while (not command_finished)
		   (setq error_ocurred (if (vl-catch-all-error-p (setq grread_data (vl-catch-all-apply 'grread (list t 12 0)))) t nil))
		   (redraw)
	       	   (cond
			(
				error_ocurred
					(prompt "\nCommand cancelled")
					(mapcar 'vla-erase (apply 'append (mapcar 'cadr (cdr copied_set))))
					(setq command_finished t)
			)
			(
				(= 5 (car grread_data))
					(grdraw base_point
							(setq copied_point (inters base_point
						    				   second_point
						    				   (cadr grread_data)
						    				   (polar (cadr grread_data) (+ (* 0.5 pi) (angle base_point second_point)) 1)
						    				   nil
									   )
						    )
							1
					)
					(cond
						(
							(and
								 (&amp;lt; (car (last copied_set)) (setq current_copy_index (fix (/ (distance base_point (cadr grread_data)) copy_distance))))
								 (null (assoc current_copy_index copied_set))
							)
								(repeat (- current_copy_index (car (last copied_set)))
									(foreach object (setq copied_instance (mapcar 'vla-copy original_copy_instance))
										(vla-move object (vlax-3d-point (trans base_point 1 0))
														 (vlax-3d-point (trans (polar base_point
														 							  (angle base_point copied_point)
																					  (* (setq added_copy_index (1+ (car (last copied_set)))) copy_distance)
																			   )
																			   1 0
																		)
														 )
										)
									)
									(setq copied_set (append copied_set (list (list added_copy_index copied_instance))))
								)
						)
						(
							t
								(repeat (- (car (last copied_set)) current_copy_index)
									(mapcar 'vla-erase (cadr (last copied_set)))
									(setq copied_set (crd copied_set))
								)
						)
					)
			)
			(
				(= 3 (car grread_data))
					(setq command_finished t)
			)
			(
				t
					(prompt "\nWrong key pressed!")
			)
		   )
	)
	(princ)
)

;****************************************************************************************************************************&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 17:11:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133711#M26304</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2023-07-28T17:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Quick copy with spacing - LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133754#M26305</link>
      <description>&lt;P&gt;Nice, you re like god of lisp, but I found little bit issue when I want copy object&amp;nbsp;vertically sent me error.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dynamic copy issue.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1246440iC98A416EF94BBF12/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dynamic copy issue.png" alt="dynamic copy issue.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 15:10:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133754#M26305</guid>
      <dc:creator>Lukasvop1</dc:creator>
      <dc:date>2023-07-28T15:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Quick copy with spacing - LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133837#M26306</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/524107"&gt;@CADaSchtroumpf&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;And can't the ARRAY command do this job?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Certainly it can!&amp;nbsp; Here's a horizontal one very like the Message 1 video:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:AHD (/ ss); = Array Horizontally, Dynamic
  (if (setq ss (ssget "_:L"))
    (progn ; then
      (initcommandversion)
      (command "_.array" ss "" "_rectangular"
        "_rows" 1 "" ""
        "_columns" 2 (getdist)
      ); command
    )
  ); if
  (prin1)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That leaves you with two of them, likely not initially at the right spacing but it's asking you for the spacing, so give it that [either by picking two points as in the video or typing in a value], and then you're left to grab the grip and drag for the number of columns, as in the video.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ahd.gif" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1246469iBB1C2516D520CA00/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ahd.gif" alt="ahd.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;It works whether you have ARRAY set to be Associative or not, but that choice could be built in if you have a preference.&amp;nbsp; Also set DELOBJ for whether you want the source object(s) to remain in addition to the Array result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A single command could be made to offer the choice of going horizontal or vertical, or separate commands could be defined, or....&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 16:07:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133837#M26306</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-07-28T16:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Quick copy with spacing - LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133943#M26307</link>
      <description>&lt;P&gt;check update in 7.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 16:44:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133943#M26307</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2023-07-28T16:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Quick copy with spacing - LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133974#M26308</link>
      <description>&lt;P&gt;Now it's perfect, exactly the same as on the video, thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 16:59:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133974#M26308</guid>
      <dc:creator>Lukasvop1</dc:creator>
      <dc:date>2023-07-28T16:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Quick copy with spacing - LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133998#M26309</link>
      <description>&lt;P&gt;your welcome)&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 17:13:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12133998#M26309</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2023-07-28T17:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Quick copy with spacing - LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12134885#M26310</link>
      <description>&lt;P&gt;if you want to copy objects on an angle array will work when you say pick start point, end point for angle line use UCS OB (entlast) or UCS 2 points than array will match the angle. Then UCS W to return back.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jul 2023 03:32:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12134885#M26310</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-07-29T03:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Quick copy with spacing - LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12135067#M26311</link>
      <description>&lt;P&gt;Yes, but this is simplified, komondormrex solved it in his script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.) select object to array&lt;BR /&gt;2.) pick base point&lt;BR /&gt;3.) pick second point - define "angle" and "spacing" at the same time&lt;BR /&gt;4.) drag mouse - increase/decrease "number of copies"&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jul 2023 07:42:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-copy-with-spacing-lisp/m-p/12135067#M26311</guid>
      <dc:creator>Lukasvop1</dc:creator>
      <dc:date>2023-07-29T07:42:09Z</dc:date>
    </item>
  </channel>
</rss>

