<?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: How to use new array command with lisp in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/9216071#M292483</link>
    <description>&lt;P&gt;&lt;SPAN&gt;How can we combine the following lispi with AR.lsp. I want the result to be a direct intermediate distance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:ds (/ d a b)&lt;BR /&gt;(if (setq d (getdist "\nDist:"))&lt;BR /&gt;(alert (strcat "X= " (rtos (setq a (/ d 1200)) 2 2)&lt;BR /&gt;"\nY= " (rtos (setq b (1+ (fix a))) 2 2) "\nZ= " (rtos (/ (- d 122) b) 2 2)))&lt;BR /&gt;) (princ)&lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Sun, 22 Dec 2019 14:16:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-12-22T14:16:58Z</dc:date>
    <item>
      <title>How to use new array command with lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/6040598#M292479</link>
      <description>&lt;P&gt;Array in AutoCAD 2012 and later seems to be more difficult than oder one.&lt;BR /&gt;&lt;BR /&gt;In this video, I 'll show you:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; How to use Older Array command - ARRAYCLASSIC in new AutoCAD.&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; How to use ARRAY command&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Special, a mini lisp AR command will help you more.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;div class="video-embed-center video-embed"&gt;&lt;iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FrAzp-VpP690%3Ffeature%3Doembed&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrAzp-VpP690&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FrAzp-VpP690%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" width="400" height="225" scrolling="no" title="New ARRAY command in AutoCAD" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have fun!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Download link: &lt;A href="http://www.mediafire.com/download/ib9ryy788879g08/AR.VLX" target="_self"&gt;AR.VLX from Mediafire&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2016 07:55:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/6040598#M292479</guid>
      <dc:creator>lemanhhung0302</dc:creator>
      <dc:date>2016-02-16T07:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use new array command with lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/6045604#M292480</link>
      <description>&lt;P&gt;Source code:&lt;/P&gt;&lt;PRE&gt;(defun c:ar ( / ss p1 p2 therows thecols drows dcols)
	(vl-load-com)
	(setq ss (ssget "_:L"))
	(setq p1 (getpoint " Specify first point: "))
	(setq p2 (getpoint p1 " Specify second point: "))
	(if (and p1 p2)
		(progn
			(if (= (car p1) (car p2))
				(setq therows 2 thecols 1 drows (- (cadr p2) (cadr p1)) dcols (- (cadr p2) (cadr p1)))
				(if (= (cadr p1) (cadr p2))
					(setq therows 1 thecols 2 drows (- (car p2) (car p1)) dcols (- (car p2) (car p1)))
					(setq therows 2 thecols 2 drows (- (cadr p2) (cadr p1)) dcols (- (car p2) (car p1)))
				)
			)
			(vla-sendcommand
				(vla-get-activedocument (vlax-get-acad-object))
				(strcat "array\rp\r\rR\rROW\r" (itoa therows) "\n" (rtos drows 2 10) "\n\nCOL\r" (itoa thecols) "\r" (rtos dcols 2 10) "\r\r")
			)
		)
	)
	(princ "\nwww.tankhanh.com.vn")
	(princ)
)&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Feb 2016 15:27:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/6045604#M292480</guid>
      <dc:creator>lemanhhung0302</dc:creator>
      <dc:date>2016-02-18T15:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to use new array command with lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/6046474#M292481</link>
      <description>&lt;P&gt;The new associative array is easier to use, not harder. &amp;nbsp;Turn on the Ribbon to see just how easy it is to use.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 23:18:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/6046474#M292481</guid>
      <dc:creator>GrantsPirate</dc:creator>
      <dc:date>2016-02-18T23:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to use new array command with lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/6049724#M292482</link>
      <description>&lt;P&gt;Thank you, mr GrandsPirate&lt;/P&gt;&lt;P&gt;I never use Ribbon before&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 01:53:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/6049724#M292482</guid>
      <dc:creator>lemanhhung0302</dc:creator>
      <dc:date>2016-02-22T01:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to use new array command with lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/9216071#M292483</link>
      <description>&lt;P&gt;&lt;SPAN&gt;How can we combine the following lispi with AR.lsp. I want the result to be a direct intermediate distance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:ds (/ d a b)&lt;BR /&gt;(if (setq d (getdist "\nDist:"))&lt;BR /&gt;(alert (strcat "X= " (rtos (setq a (/ d 1200)) 2 2)&lt;BR /&gt;"\nY= " (rtos (setq b (1+ (fix a))) 2 2) "\nZ= " (rtos (/ (- d 122) b) 2 2)))&lt;BR /&gt;) (princ)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Sun, 22 Dec 2019 14:16:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/9216071#M292483</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-22T14:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use new array command with lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/9216074#M292484</link>
      <description>&lt;P&gt;I'm using it for the array command.&lt;/P&gt;&lt;P&gt;but I couldn't combine two lispis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:arrv ( / ss-&amp;gt;list copyv dx gr nl nx obs obx p0 pd pw px vx ) (vl-load-com)&lt;/P&gt;&lt;P&gt;;; © Lee Mac 2011 found at the swamp&lt;/P&gt;&lt;P&gt;(defun ss-&amp;gt;list ( ss / i l )&lt;/P&gt;&lt;P&gt;(if ss&lt;/P&gt;&lt;P&gt;(repeat (setq i (sslength ss))&lt;/P&gt;&lt;P&gt;(setq l (cons (vlax-ename-&amp;gt;vla-object (ssname ss (setq i (1- i)))) l))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;(defun copyv ( ob n v / i b l ) (setq i 1 b (vlax-3D-point '(0. 0. 0.)))&lt;/P&gt;&lt;P&gt;(repeat n&lt;/P&gt;&lt;P&gt;(foreach obj ob&lt;/P&gt;&lt;P&gt;(vla-move (car (setq l (cons (vla-copy obj) l))) b (vlax-3D-point (mapcar '* v (list i i i))))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;(setq i (1+ i))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;l&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;(if&lt;/P&gt;&lt;P&gt;(and&lt;/P&gt;&lt;P&gt;(setq obs (ss-&amp;gt;list (ssget '((0 . "~VIEWPORT")))))&lt;/P&gt;&lt;P&gt;(setq p0 (getpoint "\nBase Point: "))&lt;/P&gt;&lt;P&gt;(setq px (getpoint "\nArray Vector: " p0))&lt;/P&gt;&lt;P&gt;(setq pw (trans p0 1 0)&lt;/P&gt;&lt;P&gt;pd (trans p0 1 3)&lt;/P&gt;&lt;P&gt;vx (trans (mapcar '- px p0) 1 0) dx (distance '(0. 0. 0.) vx)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;(not (equal dx 0.0 1e-14))&lt;/P&gt;&lt;P&gt;(princ "\nArray Endpoint: ")&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;(while (= 5 (car (setq gr (grread 't 13 0)))) (redraw)&lt;/P&gt;&lt;P&gt;(setq obx (car (mapcar 'vla-delete obx))&lt;/P&gt;&lt;P&gt;nx (fix (setq nl (/ (caddr (trans (setq gr (mapcar '- (cadr gr) p0)) 1 vx)) dx)))&lt;/P&gt;&lt;P&gt;obx (copyv obs (abs nx) (mapcar (if (minusp nx) '- '+) vx))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;(grvecs (list -3 '(0. 0. 0.) (mapcar '* (trans vx 0 3) (list nl nl nl)))&lt;/P&gt;&lt;P&gt;(list&lt;/P&gt;&lt;P&gt;(list 1. 0. 0. (car pd))&lt;/P&gt;&lt;P&gt;(list 0. 1. 0. (cadr pd))&lt;/P&gt;&lt;P&gt;(list 0. 0. 1. (caddr pd))&lt;/P&gt;&lt;P&gt;(list 0. 0. 0. 1.)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;(redraw) (princ)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Sun, 22 Dec 2019 14:21:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/9216074#M292484</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-22T14:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to use new array command with lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/9216080#M292485</link>
      <description>&lt;P&gt;&lt;SPAN&gt;my favourite&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:tt (/ ss p1 p2 num ang dst dst2)&lt;BR /&gt;(if (and (setq ss (ssget "_:L"))&lt;BR /&gt;(setq p1 (getpoint "\nSpecify first point: "))&lt;BR /&gt;(setq p2 (getpoint p1 "\nSpecify next point: "))&lt;BR /&gt;(progn (initget 6) (setq num (getint "\nSpecify number of copies: ")))&lt;BR /&gt;)&lt;BR /&gt;(progn&lt;BR /&gt;(setq ang (angle p1 p2)&lt;BR /&gt;dst (distance p1 p2)&lt;BR /&gt;dst2 0.&lt;BR /&gt;)&lt;BR /&gt;(repeat num (command "_.copy" ss "" "_non" p1 "_non" (polar p1 ang (setq dst2 (+ dst dst2)))))&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Sun, 22 Dec 2019 14:31:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/how-to-use-new-array-command-with-lisp/m-p/9216080#M292485</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-22T14:31:26Z</dc:date>
    </item>
  </channel>
</rss>

