<?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: How to get start and end points of an existing mleader in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8166232#M101649</link>
    <description>&lt;P&gt;Is that in conjunction to&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun _ss2objlist (l)
  (if	l
    (mapcar 'vlax-ename-&amp;gt;vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex l))))
  )
)
(if (setq s (ssget ":L" '((0 . "multileader")(8 . "TEXT_FQNID"))))
(foreach object (_ss2objlist s)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i think this is really close excpet source_obj isnt a leader its a line the leader is pointing to.&amp;nbsp;&lt;BR /&gt;if i call s from the selection set in place of source_obj will that generate what we are looking for?&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is where i am sitting&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:RELFQ (/)
(vl-load-com)
(command "clayer" "TEXT_FQNID") ;set current layer
(setq mldr (ssget "X" '((0 . "MULTILEADER")(8 . "TEXT_FQNID")))) ; select mleaders
(setq i (sslength mldr))

&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;

(defun _ss2objlist (l)
  (if	l
    (mapcar 'vlax-ename-&amp;gt;vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex l))))
  )
)
(if (setq s (ssget ":L" '((0 . "multileader")(8 . "TEXT_FQNID"))))
(foreach object (_ss2objlist s)

(if (setq pts (vlax-invoke s 'getleaderlinevertices 0))
	   (setq pt1 (list (car pts) (cadr pts) (caddr pts)))
	   (setq pt2 (list (car (setq pts (cdddr pts))) (cadr pts) (caddr pts)))
)

&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
(setq source_obj (car (nentselp pt1))) ;;; this is where i need the points from vla-getleaderlinevertices
  (if (null source_obj)
    (prompt "\nNo source object selected.")
    (progn
      (setq lst (ade_odgettables source_obj));;get the name of the object data tables for a selection
      (setq fqnid (ade_odgetfield source_obj lst "FQN_ID" 0)) ;;get object data field "FQN_ID" from table called with lst 
      (setq clength (rtos (ade_odgetfield source_obj lst "CALCULATED" 0) 2 2));;get object data field "calculated from lst table and turn real to string 
      (setq fibercnt (rtos (ade_odgetfield source_obj lst "NUMBEROFFI" 0) 2 0));; same as above but with "numberoffi" field
      (setq wrkord (ade_odgetfield source_obj lst "WORKORDERI" 0));;get field for "workordferi" field in lst table 
      (setq fqnidstr (strcat "\nFQNID#: " fqnid)) ;;the rest strcats each line together 
      (setq clengthstr (strcat "\nLENGTH: " clength " FT"))
      (setq fibercntstr (strcat "\nFIBER SIZE: " fibercnt))
      (setq wrkordstr (strcat "\nWORK ORDER: " wrkord))
      (setq ctype (lisped  "1")) ;;this calls for the user to specify the quanity of an item 
      (setq ctypestr (strcat ctype "-2\" %%C HDPE")) ;;strcats the user defined quantity 
      (setq str (strcat ctypestr fqnidstr clengthstr fibercntstr wrkordstr)) ;; puts everything together 
      (command "mleader" pt1 pt2 str) ;; this is where i need the points from vla-getleaderlinevertices
    );progn
    );if
    );foreach 
  );if
);defun&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jul 2018 22:08:53 GMT</pubDate>
    <dc:creator>dwattersAMXH5</dc:creator>
    <dc:date>2018-07-30T22:08:53Z</dc:date>
    <item>
      <title>How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165189#M101637</link>
      <description>&lt;P&gt;hello,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am building a lisp to select mleaders and replace them with new mleaders in the same location (changing note in mleader, with data pulled from object data)&amp;nbsp;&lt;BR /&gt;to do this i am going to need to get the start and end point location of the existing leader to plug in to the command to build the new mleader.&amp;nbsp;&lt;BR /&gt;I will also use the start point to populate an nentselp to pull new object data from the object at the point.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;to better clarify -&amp;nbsp;&lt;BR /&gt;i have built a lisp to label a line with an mleader which pulls attributes out of object data.&lt;BR /&gt;the best way i can see to automatically update the mleader with new object data (other then doing a find and replace on the text) is to complete delete the original mleader and replace with a new mleader in its exact place which would pull update object data information.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;it will be easy to ssget by the layer because all of these are on a specific layer. and then run a for reach to pull the setq variables i need, delete old one, make new one. i am just not sure about how to get the start and end point data out of the existing mleader so that i can plug those values into the setq variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can anyone explain the function to do this or at least point me in a direction so that i can do my own searching.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for any help in this,&amp;nbsp;&lt;BR /&gt;i can post my starting lisp for the initial mleader if that helps&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 15:23:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165189#M101637</guid>
      <dc:creator>dwattersAMXH5</dc:creator>
      <dc:date>2018-07-30T15:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165273#M101638</link>
      <description>&lt;PRE&gt;(defun C:MLDR2LDR (/ ss data leader-10-list start-pt last-pt one-before-the-last-pt
                     lyr curlyr)
  (setvar "cmdecho" 0)
  (setq curlyr (getvar "clayer"))
  (command "UNDO" "mark") ;undo mark
  (prompt "Enter all for Selection: ")
  (setq ITEMS (ssget '((0 . "MULTILEADER")))) ;select items
  (setq i (sslength ITEMS)) ;counter
  (while (&amp;gt; i 0) ;while items left
    (defun massoc	(key EntData / x nlist)
      (foreach x EntData
        (if (eq key (CAR x))
         (setq nlist (cons (cdr x) nlist))
        ) ;_ end of if 
      ) ;_ end of foreach 
      (reverse nlist)
    ) ;_ end of DEFUN
    (setq i (1- i)) ;decrement counter
    (setq EN (ssname ITEMS i)) ;get name
    (setq data (entget EN)) ;entity info
    (setq lyr (cdr (assoc 8 data)))
    (setq leader-10-list (massoc 10 data))
    (setq start-pt (nth 2 leader-10-list)) ;_ 3dr
    (setq last-pt (nth 0 leader-10-list)) ;_1st
    (setq one-before-the-last-pt (nth 1 leader-10-list)) ;_ 2nd&lt;/PRE&gt;&lt;P&gt;so if I'm understanding this right -&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  (setq ITEMS (ssget '((0 . "MULTILEADER")(8."LAYER NAME"))) ;select items
  (setq i (sslength ITEMS)) ;counter
  (while (&amp;gt; i 0) ;while items left
    (defun massoc	(key EntData / x nlist)
      (foreach x EntData
        (if (eq key (CAR x))
         (setq nlist (cons (cdr x) nlist))
        ) ;_ end of if 
      ) ;_ end of foreach 
      (reverse nlist)
    ) ;_ end of DEFUN
    (setq i (1- i)) ;decrement counter
    (setq EN (ssname ITEMS i)) ;get name
    (setq data (entget EN)) ;entity info
    (setq lyr (cdr (assoc 8 data)))
    (setq leader-10-list (massoc 10 data))
    &lt;STRONG&gt;(setq pt1 (nth 2 leader-10-list)) ;_ 3dr
    (setq pt2 (nth 0 leader-10-list)) ;_1st&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;    (setq str "whatever i want to say")&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;    (command "erase")
    (command "mleader" pt1 pt2 str)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;



&lt;/PRE&gt;&lt;P&gt;should select the correct 10 code for start and second point and erase and build a new mleader for each leader?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;any chance someone can explain the 10 code a little better?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 15:46:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165273#M101638</guid>
      <dc:creator>dwattersAMXH5</dc:creator>
      <dc:date>2018-07-30T15:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165513#M101639</link>
      <description>&lt;P&gt;From my experience with mleaders, I've found the using the vla-* functions are much easier to use than DXF data. You can get the leader points with&amp;nbsp;vla-GetLeaderLineVertices. Some examples &lt;A href="http://www.theswamp.org/index.php?topic=48967.msg540832#msg540832" target="_blank"&gt;&lt;STRONG&gt;HERE&lt;/STRONG&gt;&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 17:11:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165513#M101639</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-07-30T17:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165527#M101640</link>
      <description>&lt;P&gt;THANK YOU!&amp;nbsp; i knew there had to be a better way, i just couldn't find the function to learn lol. i've only ever used dxf data for setting limits on ssget, so trying to use it for this wasn't my ideal path.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 17:14:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165527#M101640</guid>
      <dc:creator>dwattersAMXH5</dc:creator>
      <dc:date>2018-07-30T17:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165550#M101641</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5054491"&gt;@dwattersAMXH5&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;THANK YOU!&amp;nbsp; i knew there had to be a better way, i just couldn't find the function to learn lol. i've only ever used dxf data for setting limits on ssget, so trying to use it for this wasn't my ideal path.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Glad to help.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 17:20:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165550#M101641</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-07-30T17:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165612#M101642</link>
      <description>&lt;P&gt;if you wouldnt mind -&amp;nbsp;&lt;BR /&gt;can you explain&amp;nbsp;&lt;SPAN&gt;vla&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;getleaderlinevertices a bit,&lt;BR /&gt;so when i call a CAR or CDR on the&amp;nbsp;&lt;SPAN class="br0"&gt;(&lt;/SPAN&gt;&lt;A href="http://www.theswamp.org/index.php?PHPSESSID=c8e95e09f42804203b7d13c185433aff&amp;amp;/../Sources/doc/avlisp/#vlax-invoke" target="_blank"&gt;vlax-invoke&lt;/A&gt; o 'getleaderlinevertices 0&lt;SPAN class="br0"&gt;) will it return x,y,z?&amp;nbsp;&amp;nbsp;&lt;BR /&gt;so if i have a standard mleader with a start and end point i could make a setq of (car '((&lt;A href="http://www.theswamp.org/index.php?PHPSESSID=c8e95e09f42804203b7d13c185433aff&amp;amp;/../Sources/doc/avlisp/#vlax-invoke" target="_blank"&gt;vlax-invoke&lt;/A&gt;&amp;nbsp;o 'getleaderlinevertices&amp;nbsp;0)) to get point 1, and a setq of (cdr '(...)) to get point 2?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;or is it CAR going to just return the first X?&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 17:40:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165612#M101642</guid>
      <dc:creator>dwattersAMXH5</dc:creator>
      <dc:date>2018-07-30T17:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165665#M101643</link>
      <description>&lt;PRE&gt;(defun C:RELFQ (/)
  (vl-load-com)
  (setq ITEMS (ssget '((0 . "MULTILEADER")(8 . "TEXT_FQNID"))) ;select items
  (setq i (sslength ITEMS)) ;counter
  (while (&amp;gt; i 0) ;while items left
    (setq obj (vlax-ename-&amp;gt;vla-object (items))
    (setq ptlist (vlax-invoke obj 'getleaderlinevertices 0))
    (setq pt1 (car '(ptlist))
    (setq pt2 (cdr '(ptlist))
    (setq str "string for mleader")
    (command "delete")
    (command "mleader" pt1 pt2 str)
  );while
  (setvar "cmdecho" 1)
  (princ)
) ;defun&lt;/PRE&gt;&lt;P&gt;like this basically?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 17:58:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165665#M101643</guid>
      <dc:creator>dwattersAMXH5</dc:creator>
      <dc:date>2018-07-30T17:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165942#M101644</link>
      <description>&lt;P&gt;The list is 'flat' .. ie, the first second and 3rd items are X Y Z. You need to group them like so if you want to use 'car' and 'cadr' to get the points.&lt;/P&gt;&lt;PRE&gt;(defun group3 (lst / r)
  (while lst (setq r (cons (list (car lst) (cadr lst)) r)) (setq lst (cdddr lst)))
  (reverse r)
)
(vlax-invoke (vlax-ename-&amp;gt;vla-object (car (entsel))) 'getleaderlinevertices 0)
;; getleaderlinevertices returns
(11.5718 20.9301 0.0 24.5069 36.1893 0.0)
(setq l (group3 '(11.5718 20.9301 0.0 24.5069 36.1893 0.0)))
;; group3 returns
((11.5718 20.9301) (24.5069 36.1893))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 19:50:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8165942#M101644</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-07-30T19:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8166127#M101645</link>
      <description>&lt;P&gt;ok so this is quickly going over my head lol&amp;nbsp;&lt;BR /&gt;so heres my lisp to make a mleader with the info i want.&amp;nbsp;&lt;/P&gt;&lt;P&gt;actually it enters model space,sets the right layer, makes the label, exits model space, and goes back to 0 layer.&lt;/P&gt;&lt;PRE&gt;(defun c:LFQ (/)
(command "mspace") ;enter model space 
(command "clayer" "TEXT_FQNID") ;set current layer 
  (princ "\nSelect SOURCE object: ")
  (setq source_obj (car (nentsel)))
  (if (null source_obj)
    (prompt "\nNo source object selected.")
    (progn
      (setq lst (ade_odgettables source_obj))
      (setq fqnid (ade_odgetfield source_obj lst "FQN_ID" 0))
      (setq clength (rtos (ade_odgetfield source_obj lst "CALCULATED" 0) 2 2))
      (setq fibercnt (rtos (ade_odgetfield source_obj lst "NUMBEROFFI" 0) 2 0))
      (setq wrkord (ade_odgetfield source_obj lst "WORKORDERI" 0))
      (setq fqnidstr (strcat "\nFQNID#: " fqnid))
      (setq clengthstr (strcat "\nLENGTH: " clength " FT"))
      (setq fibercntstr (strcat "\nFIBER SIZE: " fibercnt))
      (setq wrkordstr (strcat "\nWORK ORDER: " wrkord))
      (setq ctype (lisped  "1"))
      (setq ctypestr (strcat ctype "-2\" %%C HDPE"))
      (setq str (strcat ctypestr fqnidstr clengthstr fibercntstr wrkordstr))
      (command "mleader" pause pause str)
      (command "pspace")
    );progn
    );if
    (command "clayer" "0")
)&lt;/PRE&gt;&lt;P&gt;i want to keep the code close to this if possible -&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;but rather then picking the source object off the bat i want to&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(setq mldr (ssget "X" '((0 . "MULTILEADER")(8 . "TEXT_FQNID")))) ; select mleaders&lt;/PRE&gt;&lt;P&gt;get all mleaders on text_fqnid layer&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I THINK that should look something like this&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:RELFQ (/)
(vl-load-com)
(command "clayer" "TEXT_FQNID") ;set current layer
(setq mldr (ssget "X" '((0 . "MULTILEADER")(8 . "TEXT_FQNID")))) ; select mleaders
(setq i (sslength mldr))



(while (&amp;gt; i 0)
;;(setq pt1 "point 1 of mleader") ;;turn the points location into a variable that can be plugged in later in (x,y) format
;;(setq pt2 "Point 2 of mleader")
;;magic


(setq source_obj (car (nentselp pt1))) ;the first point of the mleader will always be o-snaped at the object we want to pull data from
  (if (null source_obj)
    (prompt "\nNo source object selected.")
    (progn
      (setq lst (ade_odgettables source_obj))
      (setq fqnid (ade_odgetfield source_obj lst "FQN_ID" 0))
      (setq clength (rtos (ade_odgetfield source_obj lst "CALCULATED" 0) 2 2))
      (setq fibercnt (rtos (ade_odgetfield source_obj lst "NUMBEROFFI" 0) 2 0))
      (setq wrkord (ade_odgetfield source_obj lst "WORKORDERI" 0))
      (setq fqnidstr (strcat "\nFQNID#: " fqnid))
      (setq clengthstr (strcat "\nLENGTH: " clength " FT"))
      (setq fibercntstr (strcat "\nFIBER SIZE: " fibercnt))
      (setq wrkordstr (strcat "\nWORK ORDER: " wrkord))
      (setq ctype (lisped  "1"))
      (setq ctypestr (strcat ctype "-2\" %%C HDPE"))
      (setq str (strcat ctypestr fqnidstr clengthstr fibercntstr wrkordstr))
      (command "mleader" pt1 pt2 str)
    );progn
    );if
    );while
);defun&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 21:19:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8166127#M101645</guid>
      <dc:creator>dwattersAMXH5</dc:creator>
      <dc:date>2018-07-30T21:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8166175#M101646</link>
      <description>&lt;P&gt;Sorry I'm not familiar with 'ade_odgettables' .. one thing I see is you need to learn how to iterate a selection set by converting it a list of items ... here's a simple example.&lt;/P&gt;&lt;PRE&gt;(defun c:foo (/ _ss2objlist s)		; Localize variables after the /
  ;; Function to convert a selection set to a list of vla-object
  (defun _ss2objlist (l)
    (if	l
      (mapcar 'vlax-ename-&amp;gt;vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex l))))
    )
  )
  ;; If we select some multileaders that are not on a locked layer ( 's' is the variable localized above )
  (if (setq s (ssget ":L" '((0 . "multileader"))))
    ;; Then convert the selection to a list of objects 
    (foreach object (_ss2objlist s)
      ;; and iterate the list using 'foreach' changing each 'object' within the loop to color red
      (vla-put-color object 1)
    )
  )
  ;; SSSSHHHHHHH
  (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jul 2018 21:27:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8166175#M101646</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-07-30T21:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8166202#M101647</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;'ade_odgettables' doesnt really have anything to do with getting the start and end points for the mleader,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;heres what is going on there, basically just pulling information out of an object data table to populate the text in the mleader&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;(setq source_obj (car (nentselp pt1)))&lt;STRONG&gt; ;;; this is where i need the points from vla-getleaderlinevertices&lt;/STRONG&gt;
  (if (null source_obj)
    (prompt "\nNo source object selected.")
    (progn
      (setq lst (ade_odgettables source_obj));;get the name of the object data tables for a selection
      (setq fqnid (ade_odgetfield source_obj lst "FQN_ID" 0)) ;;get object data field "FQN_ID" from table called with lst 
      (setq clength (rtos (ade_odgetfield source_obj lst "CALCULATED" 0) 2 2));;get object data field "calculated from lst table and turn real to string 
      (setq fibercnt (rtos (ade_odgetfield source_obj lst "NUMBEROFFI" 0) 2 0));; same as above but with "numberoffi" field
      (setq wrkord (ade_odgetfield source_obj lst "WORKORDERI" 0));;get field for "workordferi" field in lst table 
      (setq fqnidstr (strcat "\nFQNID#: " fqnid)) ;;the rest strcats each line together 
      (setq clengthstr (strcat "\nLENGTH: " clength " FT"))
      (setq fibercntstr (strcat "\nFIBER SIZE: " fibercnt))
      (setq wrkordstr (strcat "\nWORK ORDER: " wrkord))
      (setq ctype (lisped  "1")) ;;this calls for the user to specify the quanity of an item 
      (setq ctypestr (strcat ctype "-2\" %%C HDPE")) ;;strcats the user defined quantity 
      (setq str (strcat ctypestr fqnidstr clengthstr fibercntstr wrkordstr)) ;; puts everything together 
      (command "mleader" pt1 pt2 str) &lt;STRONG&gt;;; this is where i need the points from vla-getleaderlinevertices&lt;/STRONG&gt;
    );progn
    );if&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jul 2018 21:47:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8166202#M101647</guid>
      <dc:creator>dwattersAMXH5</dc:creator>
      <dc:date>2018-07-30T21:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8166207#M101648</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;PRE&gt;(if (setq pts (vlax-invoke source_obj 'getleaderlinevertices 0))
  (command "_.mleader"
	   (list (car pts) (cadr pts) (caddr pts))
	   (list (car (setq pts (cdddr pts))) (cadr pts) (caddr pts))
	   str
  )
)&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jul 2018 21:52:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8166207#M101648</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-07-30T21:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8166232#M101649</link>
      <description>&lt;P&gt;Is that in conjunction to&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun _ss2objlist (l)
  (if	l
    (mapcar 'vlax-ename-&amp;gt;vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex l))))
  )
)
(if (setq s (ssget ":L" '((0 . "multileader")(8 . "TEXT_FQNID"))))
(foreach object (_ss2objlist s)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i think this is really close excpet source_obj isnt a leader its a line the leader is pointing to.&amp;nbsp;&lt;BR /&gt;if i call s from the selection set in place of source_obj will that generate what we are looking for?&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is where i am sitting&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:RELFQ (/)
(vl-load-com)
(command "clayer" "TEXT_FQNID") ;set current layer
(setq mldr (ssget "X" '((0 . "MULTILEADER")(8 . "TEXT_FQNID")))) ; select mleaders
(setq i (sslength mldr))

&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;

(defun _ss2objlist (l)
  (if	l
    (mapcar 'vlax-ename-&amp;gt;vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex l))))
  )
)
(if (setq s (ssget ":L" '((0 . "multileader")(8 . "TEXT_FQNID"))))
(foreach object (_ss2objlist s)

(if (setq pts (vlax-invoke s 'getleaderlinevertices 0))
	   (setq pt1 (list (car pts) (cadr pts) (caddr pts)))
	   (setq pt2 (list (car (setq pts (cdddr pts))) (cadr pts) (caddr pts)))
)

&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
(setq source_obj (car (nentselp pt1))) ;;; this is where i need the points from vla-getleaderlinevertices
  (if (null source_obj)
    (prompt "\nNo source object selected.")
    (progn
      (setq lst (ade_odgettables source_obj));;get the name of the object data tables for a selection
      (setq fqnid (ade_odgetfield source_obj lst "FQN_ID" 0)) ;;get object data field "FQN_ID" from table called with lst 
      (setq clength (rtos (ade_odgetfield source_obj lst "CALCULATED" 0) 2 2));;get object data field "calculated from lst table and turn real to string 
      (setq fibercnt (rtos (ade_odgetfield source_obj lst "NUMBEROFFI" 0) 2 0));; same as above but with "numberoffi" field
      (setq wrkord (ade_odgetfield source_obj lst "WORKORDERI" 0));;get field for "workordferi" field in lst table 
      (setq fqnidstr (strcat "\nFQNID#: " fqnid)) ;;the rest strcats each line together 
      (setq clengthstr (strcat "\nLENGTH: " clength " FT"))
      (setq fibercntstr (strcat "\nFIBER SIZE: " fibercnt))
      (setq wrkordstr (strcat "\nWORK ORDER: " wrkord))
      (setq ctype (lisped  "1")) ;;this calls for the user to specify the quanity of an item 
      (setq ctypestr (strcat ctype "-2\" %%C HDPE")) ;;strcats the user defined quantity 
      (setq str (strcat ctypestr fqnidstr clengthstr fibercntstr wrkordstr)) ;; puts everything together 
      (command "mleader" pt1 pt2 str) ;; this is where i need the points from vla-getleaderlinevertices
    );progn
    );if
    );foreach 
  );if
);defun&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 22:08:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8166232#M101649</guid>
      <dc:creator>dwattersAMXH5</dc:creator>
      <dc:date>2018-07-30T22:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8167572#M101650</link>
      <description>&lt;PRE&gt;(defun C:RELFQ (/)
  (setvar "cmdecho" 0)
  (command "clayer" "TEXT_FQNID")
  (prompt "Selecting all Mleaders on layer : \"TEXT_FQNID\"")
  (setq ITEMS (ssget "X" (list '(0 . "MULTILEADER")'(8 . "TEXT_FQNID"))))
  (setq i (sslength ITEMS))
  (while (&amp;gt; i 0)
    (defun massoc	(key EntData / x nlist)
      (foreach x EntData
        (if (eq key (CAR x))
         (setq nlist (cons (cdr x) nlist))
        )
      )
      (reverse nlist)
    )
    (setq i (1- i))
    (setq EN (ssname ITEMS i))
    (setq data (entget EN))
    (setq lyr (cdr (assoc 8 data)))
    (setq leader-10-list (massoc 10 data))
    (setq pt1 (nth 2 leader-10-list))
    (setq pt2 (nth 1 leader-10-list))
    (setq pt3 '(pt1))
    (setq source_obj (nentselp pt3))
      (if (null source_obj)
        (prompt "\nNo source object selected.")
        (progn
          (setq tbl (ade_odgettables source_obj))
          (setq fqnid (ade_odgetfield source_obj tbl  "FQN_ID" 0))
          (setq clength (rtos (ade_odgetfield source_obj tbl "CALCULATED" 0) 2 2))
          (setq fibercnt (rtos (ade_odgetfield source_obj tbl "NUMBEROFFI" 0) 2 0))
          (setq wrkord (ade_odgetfield source_obj tbl "WORKORDERI" 0))
          (setq fqnidstr (strcat "\nFQNID#: " fqnid))
          (setq clengthstr (strcat "\nLENGTH: " clength " FT"))
          (setq fibercntstr (strcat "\nFIBER SIZE: " fibercnt))
          (setq wrkordstr (strcat "\nWORK ORDER: " wrkord))
          (setq str (strcat fqnidstr clengthstr fibercntstr wrkordstr))
          (command "erase" EN "")
          (command "mleader" pt1 pt2 str)
        );progn
      );if
  );while
  (setvar "cmdecho" 1)
  (command "clayer" "0")
  (alert "RELFQ : COMPLETE")
  (princ)
) ;defun&lt;/PRE&gt;&lt;P&gt;I ended up getting this to work except nentselp doesnt want to play nice with it yet. it does get all the points to build the new mleader though.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 13:29:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8167572#M101650</guid>
      <dc:creator>dwattersAMXH5</dc:creator>
      <dc:date>2018-07-31T13:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8167674#M101651</link>
      <description>&lt;P&gt;I'm still confused on what you are trying to accomplish .. First it was a single selection, then multiple .. then you reverted back to DXF codes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FWIW here's a quick example using the 'accepted solution' with some comments. Remember to localize variables too...&lt;/P&gt;&lt;PRE&gt;(defun c:relfq (/	   clength    clengthstr data	    en	       fibercnt	  fibercntstr
		fqnid	   fqnidstr   i		 items	    leader-10-list	  lyr
		pt1	   pt2	      pt3	 pts	    source_obj str	  tbl
		wrkord	   wrkordstr
	       )			; &amp;lt;- This is variable localization and it's important
  ;; No need to define massoc in a while loop .. only do it once
  ;; This also is not needed anymore if you use 'getleaderlinevertices
  (defun massoc	(key entdata / x nlist)
    (foreach x entdata
      (if (eq key (car x))
	(setq nlist (cons (cdr x) nlist))
      )
    )
    (reverse nlist)
  )
  (setvar "cmdecho" 0)
  (command "clayer" "TEXT_FQNID")
  (prompt "Selecting all Mleaders on layer : \"TEXT_FQNID\"")
  (setq items (ssget "X" (list '(0 . "MULTILEADER") '(8 . "TEXT_FQNID"))))
  (setq i (sslength items))
  (while (&amp;gt; i 0)
    (setq i (1- i))
    (setq en (ssname items i))
    (setq data (entget en))		; &amp;lt;- This is not needed with 'getleaderlinevertices
    (setq lyr (cdr (assoc 8 data)))	; &amp;lt;- This is not used anywhere?
    (setq leader-10-list (massoc 10 data)) ; &amp;lt;- This is not needed with 'getleaderlinevertices
    (setq pts (vlax-invoke (vlax-ename-&amp;gt;vla-object en) 'getleaderlinevertices 0))
    (setq pt1 (list (car pts) (cadr pts) (caddr pts)))
					; &amp;lt;- First three elements in 'getleaderlinevertices
    (setq pt2 (list (car (setq pts (cdddr pts))) (cadr pts) (caddr pts)))
					; &amp;lt;- Next three elements in 'getleaderlinevertices
    (setq pt3 '(pt1))			; &amp;lt;- Why the quoted point .. this will return (PT1) which is NOT a point?
    (setq source_obj (nentselp pt3)); &amp;lt;- This should not ever work because the point format is incorrect .. I think you mean (setq source_obj (nentselp pt1))
    (if	(null source_obj)
      (prompt "\nNo source object selected.")
      (progn (setq tbl (ade_odgettables source_obj))
	     (setq fqnid (ade_odgetfield source_obj tbl "FQN_ID" 0))
	     (setq clength (rtos (ade_odgetfield source_obj tbl "CALCULATED" 0) 2 2))
	     (setq fibercnt (rtos (ade_odgetfield source_obj tbl "NUMBEROFFI" 0) 2 0))
	     (setq wrkord (ade_odgetfield source_obj tbl "WORKORDERI" 0))
	     (setq fqnidstr (strcat "\nFQNID#: " fqnid))
	     (setq clengthstr (strcat "\nLENGTH: " clength " FT"))
	     (setq fibercntstr (strcat "\nFIBER SIZE: " fibercnt))
	     (setq wrkordstr (strcat "\nWORK ORDER: " wrkord))
	     (setq str (strcat fqnidstr clengthstr fibercntstr wrkordstr))
	     (command "erase" en "")
	     (command "_.mleader" pt1 pt2 str)
      )					;progn
    )					;if
  )					;while
  (setvar "cmdecho" 1)
  (command "clayer" "0")
  (alert "RELFQ : COMPLETE")
  (princ)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 14:02:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8167674#M101651</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-07-31T14:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8167730#M101652</link>
      <description>&lt;P&gt;yea i know it wasnt working&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(setq source_obj (nentselp '(pt1)))&lt;/PRE&gt;&lt;P&gt;returned&amp;nbsp; - error: bad argument type: 2D/3D point: (PT1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;had tested this last because first running&amp;nbsp; :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(setq source_obj (nentselp pt1))&lt;/PRE&gt;&lt;P&gt;returned - error: bad argument type: numberp: nil&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 14:18:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8167730#M101652</guid>
      <dc:creator>dwattersAMXH5</dc:creator>
      <dc:date>2018-07-31T14:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8167760#M101653</link>
      <description>&lt;P&gt;Well glad you got it sorted.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 14:25:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8167760#M101653</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-07-31T14:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8168601#M101654</link>
      <description>&lt;P&gt;thank you, your code works perfect -&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;nentselq is causing the problem because its not finding anything at pt1 (the mleader start location which is o-snapped to the line it should be finding)&lt;BR /&gt;&lt;BR /&gt;i don't get whats going on there except that when i run a test and prnt pt1&amp;nbsp;&lt;BR /&gt;i get&amp;nbsp;(2.61436e+06 1.26179e+06 0.0)&lt;/P&gt;&lt;P&gt;and the real point where the mleader is being placed is 2614364.09040,&amp;nbsp;1261791.96721, 0.0&amp;nbsp;&lt;BR /&gt;maybe nentselp is trying to use the scientific (2614360.00, 1261790.00, 0.0)&amp;nbsp;and causing a rounding?&lt;/P&gt;&lt;P&gt;but if mleader used the correct value (&lt;SPAN&gt;2614364.09040) i dont see why nentselp would use the "rounded" scientific value (2614360.00)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 19:28:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8168601#M101654</guid>
      <dc:creator>dwattersAMXH5</dc:creator>
      <dc:date>2018-07-31T19:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8168611#M101655</link>
      <description>&lt;P&gt;That's just a visual output based on units and precision. The point being used is full precision. What you might need to do to get that object is use a crossing window with ssget and a fuzz value to get more accurate results. Post a sample drawing.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 20:00:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8168611#M101655</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-07-31T20:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get start and end points of an existing mleader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8168644#M101656</link>
      <description>&lt;P&gt;yea thats what i thought on the&amp;nbsp;&lt;SPAN&gt;precision, but i got to the point where i was like "well maybe nentselp just does its own thing and isnt taking my point right" because i wasnt seeing any other reason for it not to work correctly, lol.&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is the lisp i am using to test that the (nentselp pt1) worked and if it was accessing the item at that point which was returning pt1 and nil&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;(defun c:relfqtest (/	   clength    clengthstr data	    en	       fibercnt	  fibercntstr
		fqnid	   fqnidstr   i		 items	    leader-10-list	  lyr
		pt1	   pt2	      pt3	 pts	    source_obj str	  tbl
		wrkord	   wrkordstr
	       )			; &amp;lt;- This is variable localization and it's important
  (setvar "cmdecho" 0)
  (command "clayer" "TEXT_FQNID")
  (prompt "Selecting all Mleaders on layer : \"TEXT_FQNID\"")
  (setq items (ssget "X" (list '(0 . "MULTILEADER") '(8 . "TEXT_FQNID"))))
  (setq i (sslength items))
  (while (&amp;gt; i 0)
    (setq i (1- i))
    (setq en (ssname items i))
    (setq pts (vlax-invoke (vlax-ename-&amp;gt;vla-object en) 'getleaderlinevertices 0))
    (setq pt1 (list (car pts) (cadr pts) (caddr pts)))
					; &amp;lt;- First three elements in 'getleaderlinevertices
    (setq pt2 (list (car (setq pts (cdddr pts))) (cadr pts) (caddr pts)))
					; &amp;lt;- Next three elements in 'getleaderlinevertices
    (setq source_obj (nentselp pt1))
    (if	(null source_obj)
      (prompt "\nNo source object selected.")
      (progn (setq tbl (ade_odgettables source_obj))
	     (setq fqnid (ade_odgetfield source_obj tbl "FQN_ID" 0))
			 (print pt1)
			 (print fqnid)
      )					;progn
    )					;if
  )					;while
  (setvar "cmdecho" 1)
  (alert "RELFQ : COMPLETE")
  (princ)
)&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;attached is a sample drawing.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;in real use the line will be xreffed but nentselp should work the same over an xref or a block as in this dwg.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:LFQ (/)&lt;BR /&gt;(command "mspace") ;enter model space&lt;BR /&gt;(command "clayer" "TEXT_FQNID") ;set current layer&lt;BR /&gt;(princ "\nSelect SOURCE object: ")&lt;BR /&gt;(setq source_obj (car (nentsel)))&lt;BR /&gt; (if (null source_obj)&lt;BR /&gt; (prompt "\nNo source object selected.")&lt;BR /&gt; (progn&lt;BR /&gt; (setq lst (ade_odgettables source_obj))&lt;BR /&gt; (setq fqnid (ade_odgetfield source_obj lst "FQN_ID" 0))&lt;BR /&gt; (setq clength (rtos (ade_odgetfield source_obj lst "CALCULATED" 0) 2 2))&lt;BR /&gt; (setq fibercnt (rtos (ade_odgetfield source_obj lst "NUMBEROFFI" 0) 2 0))&lt;BR /&gt; (setq wrkord (ade_odgetfield source_obj lst "WORKORDERI" 0))&lt;BR /&gt; (setq fqnidstr (strcat "FQNID#: " fqnid))&lt;BR /&gt; (setq clengthstr (strcat "\nLENGTH: " clength " FT"))&lt;BR /&gt; (setq fibercntstr (strcat "\nFIBER SIZE: " fibercnt))&lt;BR /&gt; (setq wrkordstr (strcat "\nWORK ORDER: " wrkord))&lt;BR /&gt; (setq str (strcat fqnidstr clengthstr fibercntstr wrkordstr))&lt;BR /&gt; (command "mleader" pause pause str)&lt;BR /&gt; (command "pspace")&lt;BR /&gt; );progn&lt;BR /&gt; );if&lt;BR /&gt; (command "clayer" "0")&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;this is the lisp to make an initial&amp;nbsp;mleader&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 19:49:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-start-and-end-points-of-an-existing-mleader/m-p/8168644#M101656</guid>
      <dc:creator>dwattersAMXH5</dc:creator>
      <dc:date>2018-07-31T19:49:16Z</dc:date>
    </item>
  </channel>
</rss>

