<?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: Get attribute value and test for specific value in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9850685#M67938</link>
    <description>&lt;P&gt;That did not work...&amp;nbsp; &amp;nbsp;Here is a drawing with the block in it.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Nov 2020 15:38:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-06T15:38:57Z</dc:date>
    <item>
      <title>Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9849369#M67936</link>
      <description>&lt;P&gt;I would like to put all blocks collected into groups or arrays or lists... lisp is weird... by and attribute value... pole_id then I need to draw a polyline according to the "drop_order".&amp;nbsp; Please help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code I have so far which draws by "drop_order" all the blocks selected but I need it to sort them by the "pole_id" first then draw polylines for each group separately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code is taken from snippets from a Lee Mac answer a long time back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun C:PP-CARDBIP ; = CONNECT BLOCKS BY INSERTION POINTS - ORIGINALLY LBS
  (/ *error* ent fmt idx ins ocs par sel spc txt typ uxa ss blk att blkinslist)
  ;(prompt "\nTo Link Blocks with Lines in Attribute Sequence,")(if (setq ss (ssget '((0 . "INSERT") (66 . 1) (2 . "ACMAP_ANN_TEMPLATE_PERMIT-FEATURES") ))); could omit (66 . 1)*
  (prompt "\nTo Link Blocks with Lines in Attribute Sequence,")
  (if (setq ss (ssget '((0 . "INSERT") (66 . 1) (2 . "ar_drop_point") ))); could omit (66 . 1)*
    (progn ; then
      (repeat (setq n (sslength ss)); step through selection set
        (setq
          blk (ssname ss (setq n (1- n))); Block entity name
          att (entnext blk); Attribute entity name
          blkinslist ; list of integer equivalents of Attribute values paired with insertion points
             (cons
              (list 
				;(atoi 
					;(princ(LM:getattributevalue att "COMMENT_1"))
					(princ(LM:getattributevalue att "drop_order"))
					;(cdr 
					;	(assoc 1 (entget att)
					;	); assoc
					;); cdr
				;); atoi - turns string into integer
				
				; gets the insertion point here
				(trans 
					(cdr 
						(assoc 10 
							(entget blk)
						); assoc
					); cdr
					0 1
				); trans
				; finish getting the insertion points
			  ); list
              blkinslist
            ); cons
        ); setq
      ); repeat
      (setq blkinslist ; replace former content
        (mapcar 'cadr ; keep only insertion points after:
          (vl-sort blkinslist '(lambda (a b) (&amp;lt; (car a) (car b)))); sorting in Attribute-value order
        ); mapcar
      ); setq	  
	  	  	  
	  (command "-COLOR" 6) 
	  (command "")
      (command "_.pline"); consider Polyline instead, possibly with specified width
      (apply 'command blkinslist); feed points to Line command
      (command ""); end Line command 		
	  
	  
	  ;(LM:inputfootage); call text input - might work on this later but have seperated the two
	  
    (princ)
    ); progn
	(prompt "\nNo PERMIT-FEATURE Blocks selected."); else
  ); if  ACMAP_ANN_TEMPLATE_PERMIT-FEATURES
); defun&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 03:26:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9849369#M67936</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-06T03:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9849593#M67937</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;without your "ar_drop_point" block i can not test this code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to change "drop_order" with "pole_id" on next code line and see if it work&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(princ(LM:getattributevalue att "drop_order"))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;note that (LM:getattributevalue) function is missing here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 06:59:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9849593#M67937</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-11-06T06:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9850685#M67938</link>
      <description>&lt;P&gt;That did not work...&amp;nbsp; &amp;nbsp;Here is a drawing with the block in it.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 15:38:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9850685#M67938</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-06T15:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9850940#M67939</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if you want to sort them by "pole_id" then why "pole_id" has empty value?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 17:30:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9850940#M67939</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-11-06T17:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9850980#M67940</link>
      <description>&lt;P&gt;I meant "id" not pole_id&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 17:51:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9850980#M67940</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-06T17:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9850989#M67941</link>
      <description>&lt;P&gt;What I need to do is have all the blocks selected and grouped by the id which corresponds to a drop coordinate group from field software, then I need them sorted by their drop_order so a polyline can be drawn for each group separately.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The end goal is to be able to select every drop_point regardless of what drop it belongs to and have a polyline drawn for each drop without having to select each drops point group 1 at a time before running the command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, if I select each drop group by themselves it works as needed... It would be more time-efficient if I could select every ar_drop_point block in a drawing and run the command once to draw all drops.&amp;nbsp; I may end up having 50+ drops in a drawing.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 17:57:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9850989#M67941</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-06T17:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9851261#M67942</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i see there are 7 ar_drop_point blocks, only 1 has attribute id=2 all other attribute id=3.&lt;/P&gt;&lt;P&gt;Are sure you want to sort them by id? it would be a&amp;nbsp;&lt;SPAN&gt;miracle if you get want you want.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;frankly i do not understand at all want is you goal so prepare a dwg with a state before running the the lisp and the state after.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;your lisp was not running at all so i fix it and make sort by id (which i still not sure if that what you want)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Moshe&lt;/SPAN&gt;&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, 06 Nov 2020 20:16:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9851261#M67942</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-11-06T20:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9851346#M67943</link>
      <description>&lt;P&gt;I'll do ya one better... here is a screencast link describing what I need it to do and what it does now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=_iBPN-797bQ" target="_blank"&gt;https://www.youtube.com/watch?v=_iBPN-797bQ&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 20:52:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9851346#M67943</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-06T20:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9851927#M67944</link>
      <description>&lt;P&gt;So you want Id drop order X Y where xy is insert point. So the ids 3 join together, the 2 join together.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In survey/roads this is known stringing common codes. You could possibly throw a file at CIV3D and it would do all of it for you insert blocks and make line work. X Y 301 .... X Y 304.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 1 X Y&lt;/P&gt;&lt;P&gt;3 2&amp;nbsp;X Y&lt;/P&gt;&lt;P&gt;3 3&amp;nbsp;X Y&lt;/P&gt;&lt;P&gt;3 4 X Y&lt;/P&gt;&lt;P&gt;2 5&amp;nbsp;X Y&lt;/P&gt;&lt;P&gt;2 6&amp;nbsp;X Y&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need a bit of time.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2020 03:49:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9851927#M67944</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-11-07T03:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9851985#M67945</link>
      <description>&lt;P&gt;This is much simpler and groups by block name but is doing I think what you want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The remake list into sub list ie group them by Id number then the join is easy, this is similar method but rather than qty want sub lists. Some thing I am not real good at I use a crude method to do it sure others are better like&amp;nbsp;&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-sorting-strings/td-p/9848596" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-sorting-strings/td-p/9848596&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(princ "\nSelect block for name")
(setq ss (ssget "_+.:E:S" (list (cons 0 "Insert"))))
(setq bname (cdr (assoc 2 (entget (ssname ss 0)))))
(setq ss (ssget (list (cons 0 "Insert")(cons 2 bname))))
(setq lst '())
(repeat (setq x (sslength ss))
(setq blk (ssname SS (setq x (- x 1) )))
(setq ins (vlax-get (vlax-ename-&amp;gt;vla-object blk) 'insertionpoint))
(setq att (vlax-invoke (vlax-ename-&amp;gt;vla-object  blk)'getattributes))
(setq lst (cons (list (vla-get-textstring (nth 1 att))(vla-get-textstring (nth 2 att)) ins ) lst))
)
(setq lst (vl-sort lst
	 '(lambda (a b)
	    (cond
	      ((&amp;lt; (car a) (car b)))
	      ((= (car a) (car b)) (&amp;lt; (cadr a) (cadr b)))
	    )
	  )
)
)
; get sub lists
;do plines next&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;List produced&lt;/P&gt;&lt;P&gt;(("2" "0" (1.11561e+07 6.3642e+06 0.0)) ("2" "1" (1.11561e+07 6.36415e+06 0.0)) ("3" "0" (1.11561e+07 6.3642e+06 0.0)) ("3" "1" (1.11561e+07 6.36425e+06 0.0)) ("3" "2" (1.11561e+07 6.36429e+06 0.0)) ("3" "3" (1.11561e+07 6.36431e+06 0.0)) ("3" "4" (1.11561e+07 6.36432e+06 0.0)) ("3" "5" (1.11561e+07 6.36433e+06 0.0)))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;desired&lt;/P&gt;&lt;P&gt;((("2" "0" (1.11561e+07 6.3642e+06 0.0)) ("2" "1" (1.11561e+07 6.36415e+06 0.0)))&lt;/P&gt;&lt;P&gt;(("3" "0" (1.11561e+07 6.3642e+06 0.0)) ("3" "1" (1.11561e+07 6.36425e+06 0.0)) ("3" "2" (1.11561e+07 6.36429e+06 0.0)) ("3" "3" (1.11561e+07 6.36431e+06 0.0)) ("3" "4" (1.11561e+07 6.36432e+06 0.0)) ("3" "5" (1.11561e+07 .36433e+060.0))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This alllows check for sub list is 1 only so no pline, and as sub list easy to do pline points as (nth (nth&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2020 04:44:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9851985#M67945</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-11-07T04:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9853386#M67946</link>
      <description>&lt;P&gt;Re thought the desired . This is the connecting pts in correct order.&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="general"&gt;(
((1.11561e+07 6.3642e+06 0.0)(1.11561e+07 6.36415e+06 0.0)(1.11561e+07 6.3642e+06 0.0))
((1.11561e+07 6.36425e+06 0.0)(1.11561e+07 6.36429e+06 0.0) (1.11561e+07 6.36431e+06 0.0)(1.11561e+07 6.36432e+06 0.0)(1.11561e+07 .36433e+060.0))
)&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; I have been using a simple compare Nth x with Nth x +1 create a lst2 then cons that to list3 as shown above. But would prefer to use a lambda style function which would be more efficient hence asking for help, the pline bit is done.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2020 05:24:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9853386#M67946</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-11-08T05:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9854132#M67947</link>
      <description>&lt;P&gt;Try with&amp;nbsp; replacing this&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(setq blkinslist		
	(mapcar	'cadr			
		(vl-sort blkinslist '(lambda (a b) (&amp;lt; (car a) (car b))))
				
	)			
 )&lt;/LI-CODE&gt;
&lt;P&gt;To&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(setq blkinslist		
       (mapcar 'caddr
	       (vl-sort	blkinslist
			'(lambda (a b)
			   (cond
			     ((&amp;lt; (cadr a) (cadr b)))
			     ((= (cadr a) (cadr b)) (&amp;lt; (car a) (car b)))
			   ) 
			 ) 
	       ) 
       )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2020 17:31:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9854132#M67947</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2020-11-08T17:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9857529#M67948</link>
      <description>&lt;P&gt;Please try this, pick a pole block for name then select all poles. I have not set a layer etc if happy can add.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; join poles by AlanH Nov 2020

(defun c:joinpoles (/ ss lst lst2 lst3 x y ans ans2 poles)
  (princ "\nSelect block for name")
  (setq ss (ssget "_+.:E:S" (list (cons 0 "Insert"))))
  (setq bname (cdr (assoc 2 (entget (ssname ss 0)))))
  (setq ss (ssget (list (cons 0 "Insert") (cons 2 bname))))
  (setq lst '())
  (repeat (setq x (sslength ss))
    (setq blk (ssname SS (setq x (- x 1))))
    (setq ins (vlax-get (vlax-ename-&amp;gt;vla-object blk) 'insertionpoint))
    (setq att (vlax-invoke (vlax-ename-&amp;gt;vla-object blk) 'getattributes))
    (setq lst (cons (list (vla-get-textstring (nth 2 att)) (vla-get-textstring (nth 1 att)) ins) lst))
  )
  (setq lst (vl-sort lst
                     '(lambda (a b)
                        (cond
                          ((&amp;lt; (car a) (car b)))
                          ((= (car a) (car b)) (&amp;lt; (cadr a) (cadr b)))
                        )
                      )
            )
  )
  (setq x 0 lst3 '() lst2 '())
  (setq ans (car (nth x lst)))
  (setq lst2 (list (caddr (nth x lst))))
  (repeat (- (length lst) 1)
    (setq ans2 (car (nth (setq x (+ x 1)) lst)))
    (if (= ans ans2)
      (progn
        (setq lst2 (cons (caddr (nth x lst)) lst2))
        (setq ans ans2)
      )
      (progn
        (setq lst3 (cons lst2 lst3))
        (setq lst2 '())
        (setq lst2 (cons (caddr (nth x lst)) lst2))
        (setq ans ans2)
      )
    )
  )
  (setq lst3 (cons lst2 lst3))
  (foreach poles lst3
    (command "_pline")
    (while (= (getvar "cmdactive") 1)
      (repeat (setq x (length poles))
        (command (nth (setq x (- x 1)) poles))
      )
      (command "")
    )
  )
  (princ)
)
(c:joinpoles)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I have not se&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 03:16:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9857529#M67948</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-11-10T03:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9863333#M67949</link>
      <description>&lt;P&gt;Bros you are all awesome as well.&amp;nbsp; Thank you for input... will be trying these out and see what happens.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 01:53:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9863333#M67949</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-12T01:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9863340#M67950</link>
      <description>&lt;P&gt;does not work&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 01:59:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9863340#M67950</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-12T01:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9863345#M67951</link>
      <description>&lt;P&gt;i'ma try this but I was looking to just join the drops.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 02:00:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9863345#M67951</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-12T02:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9863380#M67952</link>
      <description>&lt;P&gt;That is excellent.&amp;nbsp; Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 02:22:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9863380#M67952</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-12T02:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9863388#M67953</link>
      <description>&lt;P&gt;Hey I forgot all about how the pole_id needs to interact!... I need to be able to globally call this and all aerial drops be drawn.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each needs to be drawn via pole_id then id............ meaning they should all be grouped by POLE_ID, then be grouped by ID, then finally the pline drawn via drop order.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 02:26:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9863388#M67953</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-12T02:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9863828#M67954</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;does not work&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Why thank you for that, that's good to know.&lt;/FONT&gt;&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>Thu, 12 Nov 2020 07:44:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9863828#M67954</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2020-11-12T07:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get attribute value and test for specific value</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9866899#M67955</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;...meaning they should all&lt;/P&gt;
&lt;P&gt;be grouped by &lt;FONT color="#0000FF"&gt;POLE_ID&lt;/FONT&gt;, then&lt;/P&gt;
&lt;P&gt;be grouped by &lt;FONT color="#0000FF"&gt;ID&lt;/FONT&gt;, then finally the pline drawn&lt;/P&gt;
&lt;P&gt;via &lt;FONT color="#0000FF"&gt;drop orde&lt;/FONT&gt;r.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;LI-CODE lang="lisp"&gt;(defun c:ConnecTheBlocksUsingThisLispCode
       ( / OK  Listen maybe you just do_not know how_to put_this together)
;;;		pBe Nov 2020			;;;
  (setq OK (lambda ( n l) (cadr (assoc n l))))
(defun Listen ( j n m o p l)
  	(Vl-sort l '(lambda (o p)
		(cond
		     ((&amp;lt; (ok n o)(ok n p)))
		     ((= (ok n o)(ok n p))
		      		(&amp;lt; (ok m o) (ok m p)))
		     ((= (ok m o)(ok m p))
		      		(&amp;lt; (ok j o) (ok j p)))
		   )
		)
	)	 
  )
  
(defun maybe (lst)
  (entmakex (append (list (cons 0 "LWPOLYLINE")
                          (cons 100 "AcDbEntity")
                          (cons 100 "AcDbPolyline")
			  (cons 62 6)(cons 6 "ACAD_ISO02W100")
                          (cons 90 (length lst)))
                    (mapcar (function (lambda (p) (cons 10 p))) lst))))
  
  (if (setq You (ssget '((0 . "INSERT") (66 . 1) (2 . "AR_DROP_POINT") )))
    (progn
      (repeat (Setq just (sslength You))
	(setq do_not (vlax-ename-&amp;gt;vla-object (ssname You (setq just (1- just)))))
	(setq know (mapcar '(lambda (at)
			       (list (vla-get-tagstring at)(vla-get-textstring at)))
	       (vlax-invoke do_not 'GetAttributes)))
	(setq how_to (vlax-get do_not 'InsertionPoint))
	(setq put_this (cons (append know (list (trans how_to 0 1)))
			put_this)))
      	(setq together (listen "POLE_ID" "ID" "DROP_ORDER"a b put_this))
      	(maybe (mapcar 'last together))
      )
    )(princ)
  )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT size="3"&gt;&lt;EM&gt;- Thats all i have to say about -&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 10:16:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-attribute-value-and-test-for-specific-value/m-p/9866899#M67955</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2020-11-13T10:16:38Z</dc:date>
    </item>
  </channel>
</rss>

