<?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: Block attribute tag to multileader in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10388065#M59401</link>
    <description>&lt;LI-CODE lang="general"&gt;(defun c:BNameLabel (/ ent entl obj str mySourceID)
;;	CADTutor Alanjit Jun 2013 | pbe 2021	;;
 (cond ((not (setq ent (car (entsel "\nSelect block: ")))))
       ((not (eq (cdr (assoc 0 (entget ent))) "INSERT")) (princ "\nInvalid object!"))
       ((not (assoc 66 (entget ent))) (princ "\nNo Attributes on this block!"))
       ((setq pt (getpoint "\nSpecify first point: "))
        (setq entl (entlast))
        (vl-cmdf "_.mleader" "_non" pt "\\")
        (while (eq (logand 1 (getvar 'CMDACTIVE)) 1) (vl-cmdf ""))
        (if (and
	      (not (equal entl (setq entl (entlast))))
	      (setq mySourceID (Vl-some '(lambda (at)
			(if (eq (vla-get-tagstring at) "ATT")
			  	(itoa (vla-get-objectid at))))
				      (Vlax-invoke (vlax-ename-&amp;gt;vla-object ent) 'GetAttributes)))
	      (setq str (strcat "%&amp;lt;\\AcObjProp Object(%&amp;lt;\\_ObjId "  mySourceID
		                        		"&amp;gt;%).TextString&amp;gt;%"))
	      )
	  (progn 
          	(vla-put-textstring (vlax-ename-&amp;gt;vla-object entl) str )
		  (vl-cmdf "_updatefield" entl "")
		  (vlax-put  (vlax-ename-&amp;gt;vla-object entl) 'TextLineSpacingStyle 2)
       		 	)
	  (princ "\nAttribute \"ATT\" not found")
	  
       		)
 	)
     )
 (princ)
)
(vl-load-com)
(princ)
&lt;/LI-CODE&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jun 2021 08:10:38 GMT</pubDate>
    <dc:creator>pbejse</dc:creator>
    <dc:date>2021-06-14T08:10:38Z</dc:date>
    <item>
      <title>Block attribute tag to multileader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10387179#M59397</link>
      <description>&lt;P&gt;Hi all. I have attached a lisp program BNAMELABEL.LSP which at the moment reads the name of a block and place it in a multileader. I would like someone to change this program to do the following.&lt;/P&gt;&lt;P&gt;-to read one of the block attributes, named "ATT", instead of the name of the block, and attach it to the multileader&lt;/P&gt;&lt;P&gt;-the font size of the text for the multileader to be set as&amp;nbsp; 200 instead of 4 that is now&lt;/P&gt;&lt;P&gt;- somehow the "REGEN" command to be used, so that if some of the attributes named "ATT" in the blocks will be changed, using the REGEN command, the block multileaders to update accordingly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to modify this lisp routine myself but I got so many errors...&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jun 2021 20:26:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10387179#M59397</guid>
      <dc:creator>ssuoiresos</dc:creator>
      <dc:date>2021-06-13T20:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Block attribute tag to multileader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10387476#M59398</link>
      <description>&lt;P&gt;You can select a attribute directly no need to get block 1st.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(defun c:BattLabel (/ ent )
(while (setq ent (car (nentsel "\nSelect block attribute: Enter to exit :")))
(if (eq (cdr (assoc 0 (entget ent))) "ATTRIB")
	(progn
		(setq pt (getpoint "\nSpecify first point: "))
		(vl-cmdf "_.mleader" "_non" pt "\\" (cdr (assoc 1 (entget ent))))
            )
		(alert "You did not pick a ttribute ")
)
)

 (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 00:55:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10387476#M59398</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-06-14T00:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Block attribute tag to multileader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10387669#M59399</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8472127"&gt;@ssuoiresos&lt;/a&gt;&amp;nbsp;wrote:
&lt;P&gt;Hi all. I have attached a lisp program BNAMELABEL.LSP...&lt;/P&gt;
&lt;P&gt;... -to read one of the block attributes, named "ATT", instead of the name of the block,..&lt;/P&gt;
&lt;P&gt;...&amp;nbsp; using the REGEN command, the block multileaders to update accordingly.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Credit to the &lt;A href="https://www.cadtutor.net/forum/topic/13332-block-into-multileader-text/?tab=comments#comment-380579" target="_blank" rel="noopener"&gt;author&amp;nbsp;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun c:BNameLabel (/ ent entl obj)
;;	CADTutor Alanjit Jun 2013	;;
....&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I addition to&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;contribution&lt;/P&gt;
&lt;PRE&gt;(defun c:BattLabel (/ ent mySourceID  str pt)
(while (setq ent (car (nentsel "\nSelect block attribute: Enter to exit :")))
(if &lt;FONT color="#0000FF"&gt;(and&lt;/FONT&gt; (eq (cdr (assoc 0 (entget ent))) "ATTRIB")
	 &lt;FONT color="#0000FF"&gt;(eq (cdr (assoc 2 (entget ent))) "ATT"))&lt;/FONT&gt;
	(progn
	  &lt;FONT color="#0000FF"&gt;(setq mySourceID (itoa (vla-get-objectid (vlax-ename-&amp;gt;vla-object ent))))&lt;/FONT&gt;
	  	&lt;FONT color="#0000FF"&gt;(setq str (strcat "%&amp;lt;\\AcObjProp Object(%&amp;lt;\\_ObjId "  mySourceID
		                        		"&amp;gt;%).TextString&amp;gt;%"))&lt;/FONT&gt;
		(setq pt (getpoint "\nSpecify first point: "))
		(vl-cmdf "_.mleader" "_non" pt "\\"&lt;FONT color="#0000FF"&gt; str&lt;/FONT&gt;)
            )
		(alert "You did not pick a ttribute ")
	)
)
 (princ)
)
&lt;/PRE&gt;
&lt;P&gt;&lt;FONT size="3"&gt;&amp;nbsp;HTH&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 04:02:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10387669#M59399</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2021-06-14T04:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Block attribute tag to multileader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10387946#M59400</link>
      <description>&lt;P&gt;Hi. Thank you for your quick reply. Not sure what do you mean by "&lt;SPAN&gt;You can select a attribute directly no need to get block 1st&lt;/SPAN&gt;". This attribute that will be copied in the multileader, is different for every block. So I am not sure how can I do that without selecting the block that I want to label. Anyway, when I run this lisp it just gives me the message "You did not pick a attribute"...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 06:55:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10387946#M59400</guid>
      <dc:creator>ssuoiresos</dc:creator>
      <dc:date>2021-06-14T06:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Block attribute tag to multileader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10388065#M59401</link>
      <description>&lt;LI-CODE lang="general"&gt;(defun c:BNameLabel (/ ent entl obj str mySourceID)
;;	CADTutor Alanjit Jun 2013 | pbe 2021	;;
 (cond ((not (setq ent (car (entsel "\nSelect block: ")))))
       ((not (eq (cdr (assoc 0 (entget ent))) "INSERT")) (princ "\nInvalid object!"))
       ((not (assoc 66 (entget ent))) (princ "\nNo Attributes on this block!"))
       ((setq pt (getpoint "\nSpecify first point: "))
        (setq entl (entlast))
        (vl-cmdf "_.mleader" "_non" pt "\\")
        (while (eq (logand 1 (getvar 'CMDACTIVE)) 1) (vl-cmdf ""))
        (if (and
	      (not (equal entl (setq entl (entlast))))
	      (setq mySourceID (Vl-some '(lambda (at)
			(if (eq (vla-get-tagstring at) "ATT")
			  	(itoa (vla-get-objectid at))))
				      (Vlax-invoke (vlax-ename-&amp;gt;vla-object ent) 'GetAttributes)))
	      (setq str (strcat "%&amp;lt;\\AcObjProp Object(%&amp;lt;\\_ObjId "  mySourceID
		                        		"&amp;gt;%).TextString&amp;gt;%"))
	      )
	  (progn 
          	(vla-put-textstring (vlax-ename-&amp;gt;vla-object entl) str )
		  (vl-cmdf "_updatefield" entl "")
		  (vlax-put  (vlax-ename-&amp;gt;vla-object entl) 'TextLineSpacingStyle 2)
       		 	)
	  (princ "\nAttribute \"ATT\" not found")
	  
       		)
 	)
     )
 (princ)
)
(vl-load-com)
(princ)
&lt;/LI-CODE&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 08:10:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10388065#M59401</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2021-06-14T08:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Block attribute tag to multileader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10388204#M59402</link>
      <description>&lt;P&gt;Brilliant. This is what I need. I am sorry to be a pain but what do I need to change in your code for the text to appear without grey mask (I know it won't print like that...). I think now appears like a sort of field. Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 09:21:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10388204#M59402</guid>
      <dc:creator>ssuoiresos</dc:creator>
      <dc:date>2021-06-14T09:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Block attribute tag to multileader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10388235#M59403</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8472127"&gt;@ssuoiresos&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Brilliant. This is what I need. I am sorry to be a pain but what do I need to change in your code for the text to appear without grey mask (I know it won't print like that...). I think now appears like a sort of field. Thank you.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Its because it is a field. so when the user change the value of the attribute, the value onthe mleader wil hcange as well.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;You can turn the "grey mask" off with.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Command: FIELDDISPLAY&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Enter new value for FIELDDISPLAY &amp;lt;1&amp;gt;: &lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Otherwise here's a non-field code&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(defun c:BNameLabel (/ ent entl obj str)
;;	CADTutor Alanjit Jun 2013 | pbe 2021	;;
 (cond ((not (setq ent (car (entsel "\nSelect block: ")))))
       ((not (eq (cdr (assoc 0 (entget ent))) "INSERT")) (princ "\nInvalid object!"))
       ((not (assoc 66 (entget ent))) (princ "\nNo Attributes on this block!"))
       ((setq pt (getpoint "\nSpecify first point: "))
        (setq entl (entlast))
        (vl-cmdf "_.mleader" "_non" pt "\\")
        (while (eq (logand 1 (getvar 'CMDACTIVE)) 1) (vl-cmdf ""))
        (if (and
	      (not (equal entl (setq entl (entlast))))
	      (setq str (Vl-some '(lambda (at)
			(if (eq (vla-get-tagstring at) "ATT")
			  	(vla-get-textstring at)))
				      (Vlax-invoke (vlax-ename-&amp;gt;vla-object ent) 'GetAttributes)))
				)
          	(vla-put-textstring (vlax-ename-&amp;gt;vla-object entl) str )
	  )
	  (princ "\nAttribute \"ATT\" not found")
	  
       		)
 	)
 (princ)
)
(vl-load-com)
(princ)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 09:41:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10388235#M59403</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2021-06-14T09:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Block attribute tag to multileader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10388298#M59404</link>
      <description>&lt;P&gt;Sorry. I should have done my homework regarding the FIELDDISPLAY command. Didn't really used fields before. I will leave the 200 standard text height for another day.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt; Thank you so much for changing the code for me. Have a great day.&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 10:07:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/10388298#M59404</guid>
      <dc:creator>ssuoiresos</dc:creator>
      <dc:date>2021-06-14T10:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Block attribute tag to multileader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/12227136#M59405</link>
      <description>&lt;P&gt;Hi can you make one lisp, to callout the attribute values in to Multileader text as shown below image&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brk77284027_0-1694173370182.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1263953i9B5D7ED117DD9AA5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="brk77284027_0-1694173370182.png" alt="brk77284027_0-1694173370182.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 11:44:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-attribute-tag-to-multileader/m-p/12227136#M59405</guid>
      <dc:creator>brk77284027</dc:creator>
      <dc:date>2023-09-08T11:44:49Z</dc:date>
    </item>
  </channel>
</rss>

