<?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: Select text, Place Multileaderstyle with attribute block from selected text. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9469655#M75486</link>
    <description>&lt;P&gt;@Anonymous&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is my fix&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:2ml ( / txt arp lap)
 (vl-load-com)
 (setq txt (vla-get-TextString(vlax-ename-&amp;gt;vla-object (car (entsel))))) ;;; select content from text object
  	
 (setq arp (getpoint "\nPick Arrow Location: "))
 (setq lap (getpoint arp "\nPick Text Location: "))
 (vl-cmdf "_mleader" arp lap txt) ;;; This needs work
 (princ) 
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 25 Apr 2020 11:13:43 GMT</pubDate>
    <dc:creator>Moshe-A</dc:creator>
    <dc:date>2020-04-25T11:13:43Z</dc:date>
    <item>
      <title>Select text, Place Multileaderstyle with attribute block from selected text.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9469582#M75485</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i've been working on a command where I:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Select a text or mtext object ;Done&lt;/LI&gt;&lt;LI&gt;Pick an arrow point and landing point for the MLeader ;Done&lt;/LI&gt;&lt;LI&gt;use those attributes to put in a multileader style with the the current multileader style.&lt;BR /&gt;It's the standard library "_tagslot" block with the "TAGNUMBER" attribute.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;the code works great until the Edit Attributes window shows up and asks me to insert the value wich should be "txt" value from the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:2ml ( / txt arp lap)
	(vl-load-com)
	(setq txt (vla-get-TextString(vlax-ename-&amp;gt;vla-object (car (entsel))))) ;;; select content from text object
  	
	(setq arp (getpoint "\nPick Arrow Location: "))
  	(setq lap (getpoint "\nPick Text Location: "))
  	(vl-cmdf "_mleader" arp lap txt "") ;;; This needs work
	
)&lt;/LI-CODE&gt;&lt;P&gt;Thanks for checking it out.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2020 10:03:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9469582#M75485</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-25T10:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Select text, Place Multileaderstyle with attribute block from selected text.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9469655#M75486</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is my fix&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:2ml ( / txt arp lap)
 (vl-load-com)
 (setq txt (vla-get-TextString(vlax-ename-&amp;gt;vla-object (car (entsel))))) ;;; select content from text object
  	
 (setq arp (getpoint "\nPick Arrow Location: "))
 (setq lap (getpoint arp "\nPick Text Location: "))
 (vl-cmdf "_mleader" arp lap txt) ;;; This needs work
 (princ) 
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2020 11:13:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9469655#M75486</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-04-25T11:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Select text, Place Multileaderstyle with attribute block from selected text.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9469741#M75487</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;Thanks for replying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This still asks me this dialog.&lt;BR /&gt;I want lisp to fill-in this attribute under the hood automatically.&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-left" image-alt="Edit attributes.jpg" style="width: 591px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/760273i6EB511DE644E7C8D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Edit attributes.jpg" alt="Edit attributes.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2020 12:19:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9469741#M75487</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-25T12:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Select text, Place Multileaderstyle with attribute block from selected text.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9469811#M75488</link>
      <description>&lt;P&gt;Post a sample drawing (AutoCAD 2010 or earlier format drawing) of a before and after of what you are trying to achieve, to include what you are selecting to get the text item. I think the solution is simple but from what I can piece together I think you are selecting a block attribute for the text, the trying to insert the block into the MLeader.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2020 13:27:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9469811#M75488</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2020-04-25T13:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Select text, Place Multileaderstyle with attribute block from selected text.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9469902#M75489</link>
      <description>&lt;P&gt;What I'm trying to achieve is similar to the poplar MT2ML.lsp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this MLstyle "blusapparaat" has a block "_Tagslot" with an attribute "TAGNUMBER".&lt;/P&gt;&lt;P&gt;it prompts me to edit the atribute,&lt;BR /&gt;so I want the value from "txt" to be put in "blusapparaat" without the prompt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought what I wanted to achieve, was clear from my explanation...?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See dwg attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2020 14:39:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9469902#M75489</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-25T14:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Select text, Place Multileaderstyle with attribute block from selected text.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9469931#M75490</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;got you now,&amp;nbsp; here is my second fix:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you should create an attribute block by the name _tagslot as you specified (if it's something else, change it in lisp)&lt;/P&gt;&lt;P&gt;you will need to control the block scale, plus remove the landing in the mleaderstyle.&lt;/P&gt;&lt;P&gt;in mleaderstyle there is an option to use a block but as far as i remember the attribute value there will be populate to all mleaders. that's why i used simple insert block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;enjoy&lt;/P&gt;&lt;P&gt;moshe&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;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:2ml ( / txt arp lap savAttreq)
 (vl-load-com)
 (setq txt (vla-get-TextString(vlax-ename-&amp;gt;vla-object (car (entsel))))) ;;; select content from text object
  	
 (setq arp (getpoint "\nPick Arrow Location: "))
 (setq lap (getpoint arp "\nPick Text Location: "))
 (vl-cmdf "_mleader" arp lap "") ;;; This needs work

 (setq savAttreq (getvar "attreq")) 
 (setvar "attreq" 0)
 (vl-cmdf "_insert" "_tagslot" lap 1 1 0 txt)
 (setvar "attreq" savAttreq)  
 (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;</description>
      <pubDate>Sat, 25 Apr 2020 14:59:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9469931#M75490</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-04-25T14:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select text, Place Multileaderstyle with attribute block from selected text.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9470221#M75491</link>
      <description>&lt;P&gt;Posted solution at TheSwamp&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2020 18:36:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-text-place-multileaderstyle-with-attribute-block-from/m-p/9470221#M75491</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2020-04-25T18:36:30Z</dc:date>
    </item>
  </channel>
</rss>

