<?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 for combining multiple block attributes into a main block in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11679130#M36741</link>
    <description>&lt;P&gt;On holidays at moment may be a week before I get to it. Some one else may jump in.&lt;/P&gt;</description>
    <pubDate>Sat, 14 Jan 2023 11:18:29 GMT</pubDate>
    <dc:creator>Sea-Haven</dc:creator>
    <dc:date>2023-01-14T11:18:29Z</dc:date>
    <item>
      <title>Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11637019#M36715</link>
      <description>&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am looking for a lisp either already created or help with creating. What it needs to do is gather data from other blocks and incorporate that data into one block. In this situation my main block would be Fiber_Ped, I need to incorporate the data from the other blocks into it. A test drawing will be supplied. All I need from the second block is the assignment number and the address.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;368&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;916 WACO OAKDALE LA 71463&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;369&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;370&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;371&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;372&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;403&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; So essentially the Lisp would need create a new attribute system, that can house the information stored from the other blocks up to 12 assignment numbers.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 17:32:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11637019#M36715</guid>
      <dc:creator>timothy.birdwell</dc:creator>
      <dc:date>2022-12-22T17:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11637991#M36716</link>
      <description>&lt;P&gt;Try this select the attribute text to get its name eg 368, then window select all the blocks, pick a point for new block and angle.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/td-p/11637019

(defun c:wow ( / )
(setq ent (nentsel "Pick block attribute for name "))
(setq attname (cdr (assoc 2 (entget (car ent)))))
(prompt "\nSelect the blocks ")
(setq ss (ssget '((0 . "INSERT"))))

(if (= ss nil)
(alert "No blocks picked will exit")

(progn
  (setq lst '())
  (repeat (setq x (sslength ss))
    (setq blk (vlax-ename-&amp;gt;vla-object (ssname ss (setq x (- x 1)))))
              (setq atts (vlax-invoke blk 'Getattributes))
          (if (= atts nil)
		  (princ)
		  (foreach att atts
	        (if (= (vla-get-tagstring att) attname)
             (setq lst (cons (vla-get-textstring att) lst))
            )
          )
        )
    )


(setq lst (reverse (vl-sort lst '&amp;lt;)))
(setq len (- 11 (length lst)))
(repeat len
  (setq lst (cons "" lst))
)
(setq lst (reverse lst))

(setq pt (getpoint "\npick point for block ") ang (getreal "\nEnter angle "))
(if (= ang nil)(setq ang 0.0))

(setq x -1)
(setvar 'attreq 0)
(command "-insert" "Fiber_Ped" pt 1.0 1.0 ang)
(setq atts (vlax-invoke (vlax-ename-&amp;gt;vla-object (entlast) ) 'getattributes))
(setq x -1)
(repeat (length lst)
  (vla-put-textstring  (nth (setq x (1+ x)) atts)   (nth x lst))
)
(setvar 'attreq 1)

)

) ; ss nil

(princ)
)
(c:wow)
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 05:43:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11637991#M36716</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-12-23T05:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11643903#M36717</link>
      <description>&lt;P&gt;So with this code, when I select the subscriber block, which would be the number. Then I select the fiber ped box and press enter, I select the point and angle. A new block is inserted but with the standard ped_block information with nothing filled out.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2022 18:24:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11643903#M36717</guid>
      <dc:creator>timothy.birdwell</dc:creator>
      <dc:date>2022-12-27T18:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11644022#M36718</link>
      <description>So what I am needing is to be able to extract information from block "SUBSCRIBER", ASSIGNMENT_NUM " x". Also from this block I need to extract information from OD:SUBSCRIBER, lines 5, 7, 8, 11, 12, 10. These lines will be combined together to make the address as one line. This info needs to be placed on the block Fiber_Ped. Now if the lisp creates a new OD on top of the Fiber_Ped is acceptable. Also if can get the numbers to go in descending order. I can almost see how to write it but don't know how to start writing it.</description>
      <pubDate>Tue, 27 Dec 2022 19:58:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11644022#M36718</guid>
      <dc:creator>timothy.birdwell</dc:creator>
      <dc:date>2022-12-27T19:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11644521#M36719</link>
      <description>&lt;P&gt;Adding OD data adds a lot more complexity, but the simple answer is to use a LIST make the list with the number as 1st item then add all your OD data to list, so when you use the vl sort function its based on the number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;((368 "916 WACO OAKDALE LA 71463")(402 "123 WACO WOOD ST LA 71463)(.....))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2022 04:21:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11644521#M36719</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-12-28T04:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11645296#M36720</link>
      <description>&lt;P&gt;Wanting to make sure im on the right track so far what I have is a function that pulls the variables and stores into a temporary list.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:extract (/)
  ((setq SubscriberBlock (entsel))
   (setq SubscriberBlockList (entget (car SubscriberBlock)))
   (if (/= (cdr (assoc 0 SubscriberBlockList)) "block")
     (progn
     (while (/= (cdr (assoc 0 SubscriberBlockList)) "block")
       (prompt "\nSelect an object: ")
       (setq SubscriberBlock (entsel))
        (setq SubscriberBlockList (entget (car SubscriberBlock)))
        
       );End while function
     );End progn
   );End Function
  &lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 28 Dec 2022 15:48:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11645296#M36720</guid>
      <dc:creator>timothy.birdwell</dc:creator>
      <dc:date>2022-12-28T15:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11646126#M36721</link>
      <description>&lt;P&gt;Ok a couple of suggestions&amp;nbsp;&lt;/P&gt;&lt;P&gt;1st&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;(( is not needed 
(setq SubscriberBlock (entsel))&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;&lt;P&gt;2nd&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;);End Function
) ; this is end of defun missing )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok so trying&amp;nbsp; a bit more walking slowly not running.&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;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/td-p/11637019
; an attempt by AlanH Dec 2022

(defun c:wow (/)

; Sort functions By pbejse forums/autodesk

  (defun _n (str / s)
    (setq s (vl-string-right-trim "0123456789" str))
    (list s (atoi (substr str (1+ (strlen s)))))
  )

  (Defun ThisSortFunc (l)
         (Vl-sort l '(lambda (n m)
                             (setq n (_n (Car n)) m (_n (Car m)))
                       (cond
                         ((&amp;lt; (Car n) (car m)))
                         ((eq (Car n) (car m)) (&amp;lt; (Cadr n) (cadr m)))
                       )
                     )
         )
  )
  (defun c:wow (/)
    (princ "\n Pick 1 block object for block name ")
    (setq ss (ssget "_+.:E:S" '((0 . "INSERT"))))
    (if (= ss nil)
      (alert "You may not have picked a block please try again")
      (progn
        (setq blk (vlax-ename-&amp;gt;vla-object (ssname ss 0)))
        (setq bname (vla-get-name blk))
        (if (wcmatch bname "*U#*")
          (setq bname (vla-get-effectivename blk))
        )
        (princ "\nSelect the blocks ")
        (setq ss (ssget '((0 . "INSERT"))))
        (if (= ss nil)
          (alert "No blocks picked will exit")
          (progn
            (setq lst '())
            (repeat (setq x (sslength ss))
              (setq lst2 '())
              (setq blk (vlax-ename-&amp;gt;vla-object (ssname ss (setq x (- x 1)))))
              (setq blkname (vla-get-name blk))
              (if (wcmatch blkname "*U#*")
                (setq blkname (vla-get-effectivename blk))
              )
              (if (= blkname bname)
                (progn
                  (setq atts (vlax-invoke blk 'Getattributes))
                  (if (= atts nil)
                    (princ "No Atts")
                    (progn
                      (foreach att atts
                        (setq lst2 (cons (vla-get-textstring att) lst2))
                      )
                      (setq lst (cons lst2 lst))
                    )
                  )
                )
              )
            )
            (setq lst (ThisSortFunc lst))
          )
        )
      )
    )
    (princ)
  )
  (c:wow)&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;So if you look at lst type !lst you can see we are getting somewhere.&lt;/P&gt;&lt;P&gt;(("368" "") ("369" "") ("370" "") ("371" "") ("372" "") ("403" ""))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next task is to look for OD data and add to the list.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 03:54:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11646126#M36721</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-12-30T03:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11646877#M36722</link>
      <description>&lt;P&gt;So when I try to run this code I get a bad ssget mode string error.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 14:37:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11646877#M36722</guid>
      <dc:creator>timothy.birdwell</dc:creator>
      <dc:date>2022-12-29T14:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11646917#M36723</link>
      <description>&lt;P&gt;What if you changed it to:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"_+.:E:S"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 15:03:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11646917#M36723</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2022-12-29T15:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11646929#M36724</link>
      <description>&lt;P&gt;Thanks that fixed, that error. So this code as it stands right now is suppose to only extract information? I can select named object, and now objects, press enter, doesn't show anything, command ends for me.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 15:13:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11646929#M36724</guid>
      <dc:creator>timothy.birdwell</dc:creator>
      <dc:date>2022-12-29T15:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11646944#M36725</link>
      <description>&lt;P&gt;After running that code did you do as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;instructed:&lt;/P&gt;&lt;P&gt;At command prompt: type !lst&lt;/P&gt;&lt;P&gt;you should get something like:&lt;/P&gt;&lt;P&gt;(("368" "") ("369" "") ("370" "") ("371" "") ("372" "") ("403" ""))&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 15:20:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11646944#M36725</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2022-12-29T15:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11646968#M36726</link>
      <description>Ok I was typing generic list, that was straight up user error. Im watching some videos and taking notes, using the code he wrote to write notes next to it with ; so I can see what each area is doing. As the "O.D." I believe I read yesterday that its a sub list with a prefix code of 1000. Going to see if I can get that extracted now.</description>
      <pubDate>Thu, 29 Dec 2022 15:27:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11646968#M36726</guid>
      <dc:creator>timothy.birdwell</dc:creator>
      <dc:date>2022-12-29T15:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11647381#M36727</link>
      <description>&lt;P&gt;6 hours in and a little defeated, Im slowly learning and got a few functions to work. This is what I have so far, I just can not find anything that shows how to get OD info.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(DEFUN DXF (i l)(cdr (assoc i l)))

;---------------------------------;
;    SELECT BLOCK, EXTRACT OD     ;
;---------------------------------;

(defun c:foo (/ *ERROR* DAS SOURCE bname TEMPSS)
  ;SELECT BLOCK
  (SETQ DAS (ENTSEL "PLEASE CHOOSE AN OBJECT: "
            )) ;SELECT ENTITY
  
  (SETQ SOURCE (ENTGET (CAR DAS)));GET ENTITY INFO
  ;MAKE SURE ITS A BLOCK
  ;(= (dxf 0 SOURCE) "INSERT")
  ;GRAB ITS BLOCK NAME
  (setq bname (dxf 2 SOURCE))
  ;GET ALL BLOCKS
  (SETQ TEMPSS 
         (SSGET)
  ) ; _SETQ
  ;PROCESS THE BLOCKS
  ;
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 29 Dec 2022 19:52:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11647381#M36727</guid>
      <dc:creator>timothy.birdwell</dc:creator>
      <dc:date>2022-12-29T19:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11647384#M36728</link>
      <description>&lt;P&gt;if O.D. you mean extended entity data then take a look at this example:&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extended-entity-data-in-lisp/td-p/6986163" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extended-entity-data-in-lisp/td-p/6986163&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 19:56:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11647384#M36728</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2022-12-29T19:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11647893#M36729</link>
      <description>&lt;P&gt;Change this line did original off the top of my head should have looked it up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(setq ss (ssget "_+.:E:S" '((0 . "INSERT"))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.lee-mac.com/ssget.html" target="_blank"&gt;ssget Function Reference | Lee Mac Programming (lee-mac.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 03:56:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11647893#M36729</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-12-30T03:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11648703#M36730</link>
      <description>&lt;P&gt;So I believe I somewhat understand from looking at this, but do not fully comprehend. I can find the string information on the block, but as the OD goes I am unable to find it. I found&amp;nbsp;&lt;SPAN&gt;routine "XDA" from Gilles (gile), tried it and when I selected the object it stated it has no Xdata. I am fully stumped here. *UPDATE* This is working in autocad map3d, a program I've been learning rapidly. The OD I can seperate by exporting as a .shp file and re-importing it. Could this be the reason why I am unable to find the code?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="block.JPG" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1157268i935CFF6051EC84AE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="block.JPG" alt="block.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 17:23:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11648703#M36730</guid>
      <dc:creator>timothy.birdwell</dc:creator>
      <dc:date>2022-12-30T17:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11649247#M36731</link>
      <description>&lt;P&gt;Look at this example it should help you.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(setq ent (car (entsel "\n Select object for OD: ")))
(setq Address (ade_odgetfield ent odname "ADDRESS_TYPE" 0))
(setq Pcode (ade_odgetfield ent odname "POSTAL_CODE" 0))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 23:08:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11649247#M36731</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-12-30T23:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11651541#M36732</link>
      <description>&lt;P&gt;I'm still researching, and finding information. When I try to add the odd code, it overrides the previous. Any good suggestions of videos that can break it down barny style for me?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 03:54:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11651541#M36732</guid>
      <dc:creator>timothy.birdwell</dc:creator>
      <dc:date>2023-01-02T03:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11652831#M36733</link>
      <description>&lt;P&gt;I'm a little all over the place now. The biggest thing I can't do is find those other values. I'll show you where I am at right now, I know the code is redundant, but I'm trying to figure out what each line does.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:NestedAttValues (/ Sel Obj)
  (defun _n (str / s)
    (setq s (vl-string-right-trim "0123456789" str))
    (list s (atoi (substr str (1+ (strlen s)))))
  )
  (Defun ThisSortFunc (l)
         (Vl-sort l '(lambda (n m)
                             (setq n (_n (Car n)) m (_n (Car m)))
                       (cond
                         ((&amp;lt; (Car n) (car m)))
                         ((eq (Car n) (car m)) (&amp;lt; (Cadr n) (cadr m)))
                       )
                     )
         )
  )
(defun PrintAttList (BlkObj)

(print
(list
(vla-get-Name Obj)
(mapcar '(lambda (x) (cons (vla-get-TagString x) (vla-get-TextString x)))
(vlax-invoke Obj 'GetAttributes))
)
)
)
(defun GetNestedBlocks (BlkName BlkCol)
 (setq att_lst nil)
 (setq ss (ssget "X" (list (cons 0 "INSERT"))))
  (if ss
   (progn
    (setq C 0)
    (repeat (sslength ss)
     (setq blk (ssname ss C))
     (setq elist (entget blk))
     (setq bn (cdr (assoc 2 elist))); blockname
     (vlax-for Obj (vla-Item BlkCol BlkName)
      (if (= (vla-get-ObjectName Obj) "AcDbBlockReference")
       (progn
        (PrintAttList Obj)
        (GetNestedBlocks (vla-get-name Obj) BlkCol)
       )
      )
     )
    )
   )
  )
);end fun
(setq BlkCol (vla-get-Blocks (vla-get-ActiveDocument
(vlax-get-Acad-Object))))
(if
 (and
  (setq Sel (entsel "\n Select block to get nested attributes: "))
  (setq Obj (vlax-ename-&amp;gt;vla-object (car Sel)))
  (= (vla-get-ObjectName Obj) "AcDbBlockReference")
  (progn
   (MakeAttLists Obj)
   (GetNestedBlocks (vla-get-Name Obj) BlkCol)
  ); progn
 );and
 (setq C (+ C 1))
); if
(princ)
(progn
 (PrintAttList Obj)
 (GetNestedBlocks (vla-get-Name Obj) BlkCol)
)
(princ)
(princ "\n Pick 1 block object for block name ")
    (setq ss (ssget "_+.:E:S" '((0 . "INSERT"))))
    (if (= ss nil)
      (alert "You may not have picked a block please try again")
      (progn
        (setq blk (vlax-ename-&amp;gt;vla-object (ssname ss 0)))
        (setq bname (vla-get-name blk))
        (if (wcmatch bname "*U#*")
          (setq bname (vla-get-effectivename blk))
        )
        (princ "\nSelect the blocks ")
        (setq ss (ssget '((0 . "INSERT"))))
        (if (= ss nil)
          (alert "No blocks picked will exit")
          (progn
            (setq lst '())
            (repeat (setq x (sslength ss))
              (setq lst2 '())
              (setq blk (vlax-ename-&amp;gt;vla-object (ssname ss (setq x (- x 1)))))
              (setq blkname (vla-get-name blk))
              (if (wcmatch blkname "*U#*")
                (setq blkname (vla-get-effectivename blk))
              )
              (if (= blkname bname)
                (progn
                  (setq atts (vlax-invoke blk 'Getattributes))
                  (if (= atts nil)
                    (princ "No Atts")
                    (progn
                      (foreach att atts
                        (setq lst2 (cons (vla-get-textstring att) lst2))
                      )
                      (setq lst (cons lst2 lst))
                    )
                  )
                )
              )
            )
            (setq lst (ThisSortFunc lst))
          )
        )
      )
    )
    (princ)
  ) ;endfun&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 02 Jan 2023 20:34:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11652831#M36733</guid>
      <dc:creator>timothy.birdwell</dc:creator>
      <dc:date>2023-01-02T20:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for combining multiple block attributes into a main block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11653542#M36734</link>
      <description>&lt;P&gt;Had another go try this version, pick the 368 block then window the others.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/td-p/11637019
; an attempt by AlanH Dec 2022

; Sort functions By pbejse forums/autodesk



(defun _n (str / s)
    (setq s (vl-string-right-trim "0123456789" str))
    (list s (atoi (substr str (1+ (strlen s)))))
)
(Defun ThisSortFunc (l)
         (Vl-sort l '(lambda (n m)
                             (setq n (_n (Car n)) m (_n (Car m)))
                       (cond
                         ((&amp;lt; (Car n) (car m)))
                         ((eq (Car n) (car m)) (&amp;lt; (Cadr n) (cadr m)))
                       )
                     )
         )
)
(defun c:wow ( / )
(princ "\n Pick 1 block object for block name ")
(setq ss (ssget "_+.:E:S" '((0 . "INSERT"))))
(if (= ss nil)
(alert "You may not have picked a block please try again")
(progn
(setq blk (vlax-ename-&amp;gt;vla-object (ssname ss 0)))
(setq bname (vla-get-name blk))
(if (wcmatch bname "*U#*")
(setq bname (vla-get-effectivename blk))
)
(princ "\nSelect the blocks ")
(setq ss (ssget '((0 . "INSERT"))))
(if (= ss nil)
(alert "No blocks picked will exit")
(progn
(setq lst '())
(repeat (setq x (sslength ss))
(setq lst2 '())
(setq ent (ssname ss (setq x (- x 1))))
(setq blk (vlax-ename-&amp;gt;vla-object ent))
(setq blkname (vla-get-name blk))
(if (wcmatch blkname "*U#*")
(setq blkname (vla-get-effectivename blk))
)
(if (= blkname bname)
(progn
(setq atts (vlax-invoke blk 'Getattributes))
(if (= atts nil)
(princ "No Atts")
(progn
(foreach att atts
(setq lst2 (cons (vla-get-textstring att) lst2))
)
(setq odname (ade_odgettables ent))
(setq Stnum (ade_odgetfield ent odname "STREET_NUMBER" 0))
(setq Stname (ade_odgetfield ent odname "STREET_NAME" 0))
(setq state (ade_odgetfield ent odname "STATE" 0))
(setq Pcode (ade_odgetfield ent odname "POSTAL_CODE" 0))
(setq lst (cons (list  (car lst2) (strcat stnum " " stname " " state " " pcode)) lst))
(setq lst (ThisSortFunc lst))
)
)
)
)
)
(setvar 'attreq 0)
(command "-insert" "Fiber_Ped" (getpoint "\nPick insertion point ") 9 9 0)
(setvar 'attreq 1)
(setq len (length lst))
(setq blkatts (vlax-invoke (vlax-ename-&amp;gt;vla-object (entlast)) 'Getattributes))
(setq x 0 Y 0)
(repeat (- 12  len)
(vla-put-textstring (nth x blkatts) (strcat (car (nth y lst)) " " (cadr (nth y lst))))
(setq x (1+ x) y (1+ y))
)
)
)
)
)
(princ)
)
(c:wow)

&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 07:50:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combining-multiple-block-attributes-into-a-main-block/m-p/11653542#M36734</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-01-03T07:50:11Z</dc:date>
    </item>
  </channel>
</rss>

