<?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: Change attribute text size of multiple attributes in multiple blocks in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12961846#M10263</link>
    <description>&lt;P&gt;Hi K,&lt;/P&gt;&lt;P&gt;Thanks very much, that works perfectly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just want to say how fantastic this forum is. People like yourself, Sea-heaven and all others, extremely generous with your knowledge and time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2024 21:59:41 GMT</pubDate>
    <dc:creator>b_worland</dc:creator>
    <dc:date>2024-08-15T21:59:41Z</dc:date>
    <item>
      <title>Change attribute text size of multiple attributes in multiple blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12959652#M10259</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would any one have a lisp or could create a lisp that could change attribute text heights, of all attributes, of selected blocks in a drawing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem&amp;nbsp; -&amp;nbsp;&lt;SPAN&gt;I have a drawing that has multiple blocks. Each block has multiple attributes with the same and different attribute names.&amp;nbsp; All the attributes for each block are aligned vertically (see drawing attached and snapshot below). I would like to be able to select some blocks, enter a new attribute text height and have all attributes of the selected blocks change their attribute text height. I understand the lisp will also have to&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;change the vertical separation between the attribute text so they can be read. If the vertical separation doesn't change and the attribute base point stays the same this could mean the text would overlap with the other attributes in the vertical stack and be unreadable.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I don't want to change attribute text height by selecting attributes individually or one block at a time . I just want to select some blocks or every block in then have all attributes for every selected block change.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The drawing with blocks and attributes is attached.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, would anyone have or be able to create a lisp that could allow for -&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. User runs lisp. Lisp prompts for selection of some or all blocks (including ability to use previous selection set or select similar)&lt;/P&gt;&lt;P&gt;2. Lisp then selects all attributes of every selected block&lt;/P&gt;&lt;P&gt;3. Lisp prompts user to enter a new attribute text height.&lt;/P&gt;&lt;P&gt;4. Lisp changes all attribute text heights and maintains readability of the attributes in the vertical stack relative to each other.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Snapshot of "readability" of attributes that are vertically stacked prior to changing text height. The same "readability" is needed after the change to text height.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="b_worland_0-1723682943400.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1398016i6FB7D6A2ADBB23F6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="b_worland_0-1723682943400.png" alt="b_worland_0-1723682943400.png" /&gt;&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;I wish i had some programming knowledge but I don't. Any help appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 01:34:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12959652#M10259</guid>
      <dc:creator>b_worland</dc:creator>
      <dc:date>2024-08-15T01:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Change attribute text size of multiple attributes in multiple blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12959788#M10260</link>
      <description>&lt;P&gt;Bit rough and very little testing.&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;(defun c:attsc ( / obj atts att pt ht sc x xp y yp)
(setq obj (vlax-ename-&amp;gt;vla-object (car (entsel "\nSelect a block object "))))
(setq atts (vlax-invoke obj 'Getattributes))

(setq x 0.0 y 0.0)
(foreach att atts 
  (setq pt (vlax-get att 'Insertionpoint))
  (setq xp (car pt) Yp (cadr pt))
  (setq x (+ x xp) Y (+ y yp))
)
(setq x (/ x (length atts)) y (/ Y (length atts)))
(setq pt (list X y))

(setq ht (vlax-get (car atts) 'height))
(setq sc (/ (getreal "\nEnter new height ") ht))

(foreach att atts
  (command "scale" (vlax-vla-object-&amp;gt;ename att) "" pt sc)
)
(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;</description>
      <pubDate>Thu, 15 Aug 2024 04:28:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12959788#M10260</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-08-15T04:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Change attribute text size of multiple attributes in multiple blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12960031#M10261</link>
      <description>&lt;P&gt;hey there,&lt;/P&gt;&lt;P&gt;in most simple terms&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:atts_change_height (/ insert_sset height att_list scale_point scale_factor)
	(if (setq insert_sset (ssget '((0 . "insert") (66 . 1))))
		(progn 
			(setq height (getreal "\nEnter desirable heigth for all attributes: "))
			(foreach insert (mapcar 'vlax-ename-&amp;gt;vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex insert_sset))))
				(setq att_list (vlax-invoke insert 'getattributes)
					  scale_point (mapcar '+ (list 0 (vla-get-height (car att_list)) 0) 
					  						 (vlax-get (car att_list) 'insertionpoint)
								  )
					  scale_factor (/ height (vla-get-height (car att_list)))  
				)
				(mapcar '(lambda (attribute) (vla-scaleentity attribute (vlax-3d-point scale_point) scale_factor))
						 att_list
				)
			)
		)
	)
	(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 07:34:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12960031#M10261</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2024-08-15T07:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Change attribute text size of multiple attributes in multiple blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12961185#M10262</link>
      <description>&lt;P&gt;Hmm.&lt;/P&gt;&lt;P&gt;That seems to scale the entire block ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 16:46:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12961185#M10262</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-08-15T16:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Change attribute text size of multiple attributes in multiple blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12961846#M10263</link>
      <description>&lt;P&gt;Hi K,&lt;/P&gt;&lt;P&gt;Thanks very much, that works perfectly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just want to say how fantastic this forum is. People like yourself, Sea-heaven and all others, extremely generous with your knowledge and time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 21:59:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12961846#M10263</guid>
      <dc:creator>b_worland</dc:creator>
      <dc:date>2024-08-15T21:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Change attribute text size of multiple attributes in multiple blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12961854#M10264</link>
      <description>&lt;P&gt;Hi Sea-haven,&lt;/P&gt;&lt;P&gt;Thank you for sending this through. I couldn't quite get it to work, but &lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916" target="_self"&gt;&lt;SPAN class=""&gt;Komondormrex has sent a solution in.&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As I said in my reply to&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916" target="_self"&gt;&lt;SPAN class=""&gt;komondormrex&lt;/SPAN&gt;&lt;/A&gt;, generous people, like yourself, make this a great forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 22:04:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12961854#M10264</guid>
      <dc:creator>b_worland</dc:creator>
      <dc:date>2024-08-15T22:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Change attribute text size of multiple attributes in multiple blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12962196#M10265</link>
      <description>&lt;P&gt;There are numerous blocks but I looked for one that matched and it seemed to work.&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="SeaHaven_0-1723780691701.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1398529i17B9EFD4FA639079/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1723780691701.png" alt="SeaHaven_0-1723780691701.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note the "X" has not changed which would have been the block scaling.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 03:58:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12962196#M10265</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-08-16T03:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Change attribute text size of multiple attributes in multiple blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12962213#M10266</link>
      <description>&lt;P&gt;your welcome)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 04:16:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-attribute-text-size-of-multiple-attributes-in-multiple/m-p/12962213#M10266</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2024-08-16T04:16:52Z</dc:date>
    </item>
  </channel>
</rss>

