Results 1 to 2 of 2

Thread: LeardrToMleader.lsp not working

  1. #1
    I could stop if I wanted to
    Join Date
    2011-09
    Posts
    308
    Login to Give a bone
    0

    Default LeardrToMleader.lsp not working

    Hiya gang,

    I've been using the routine below from CADALYST for years. now for some reason in AutoCAD 2017 it's not working. It creates the new Mtext entity from the selected Leader and Mtext, but it's not deleting the original objects.

    Also, I get the following in the command line after the command completes:
    Pick Leader
    Pick Text-layer
    Current layer: "L-00 SWTB TEXT"
    Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]: s
    Enter layer name to make current or <select object>: L-00 SWTB TEXT Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]:
    Command: mleader
    Specify leader arrowhead location or [leader Landing first/Content first/Options] <Options>:
    Specify next point:
    Specify next point: \A1;test
    Invalid Input.
    Specify next point: ERASE
    Invalid Input.
    Specify next point:
    Invalid Input.
    Specify next point:
    Enter text: erase
    Command: <Entity name: 4B841090>


    Code:
    ;;; CADALYST 08/08  www.cadalyst.com/code ;;; Tip 2305: LeaderToMleader.lsp    Leader to Multileader    (c) 2008 Lyle Hardin 
    ;;; Pick an old style leader and text to create a new mleader entity and erase the old leader and text.
    ;;; March/2008
    
    
    (defun c:leadertomleader ()
      (setq    leader    (entsel "\nPick Leader")    ; pick leader
        leader2    (entget (car leader))
        pt1    (dxf 10 leader2)        ; get first point of leader
        layer     (dxf 8 leader2)            ; get layer of leader
    
    
        mtext    (entsel "\nPick Text")    ; pick text
        mtext2    (entget (car mtext))
        pt2    (dxf 10 mtext2)        ; get point of text
        text    (dxf 1 mtext2)        ; get 
      )                    ; setq
      
      (command "-layer" "s" layer "")    ; set layer of leader picked to current
      (command "mleader" pt1 pt2 text)    ; start mleader command
      (COMMAND "ERASE" mtext "")        ; erase text picked
      (command "erase" leader "")        ; erase leader picked
    
    
    )                    ; defun
    
    
    (defun dxf(code elist)        ; define dxf function
      (cdr (assoc code elist))     ;Finds the association pair, strips 1st element
    );defun
    Thanks as always for any help...

  2. #2
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    561
    Login to Give a bone
    0

    Default Re: LeardrToMleader.lsp not working

    Its getting an error at the Pt1 Pt2 text point

    Checked in 2016 & 2018 worked ok ?

Similar Threads

  1. 2013 Alt+x not working
    By vanderloo5 in forum 3ds Max - General
    Replies: 0
    Last Post: 2013-04-27, 01:36 PM
  2. Replies: 1
    Last Post: 2012-02-16, 06:57 PM
  3. are already in the working set
    By moshira_hassan in forum AutoCAD General
    Replies: 0
    Last Post: 2010-01-10, 04:11 PM
  4. Working with 3D
    By rhayes.99001 in forum ACA General
    Replies: 1
    Last Post: 2007-08-25, 08:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •