See the top rated post in this thread. Click here

Results 1 to 9 of 9

Thread: convert mtext to multileader

  1. #1
    Member
    Join Date
    2006-10
    Posts
    7
    Login to Give a bone
    0

    Default convert mtext to multileader

    Hi,
    I was wondering if anyone has a lisp or vba to convery mtext (no leader) to multileader text (no leader)?

    Cheers
    TMG

  2. #2
    100 Club
    Join Date
    2008-05
    Posts
    161
    Login to Give a bone
    1

    Default Re: convert mtext to multileader

    Code:
    (defun c:mt2ml ( / oobj nobj nstrg)
      (vl-load-com)
      (setq oobj (vlax-ename->vla-object (car (nentsel "\nSelect source text: "))))
      (if (= (vlax-get-property oobj 'ObjectName) "AcDbMText")
        (setq nstrg (vlax-get-property oobj 'TextString))
        (exit)	   
        )
      (command "_MLEADER")
      (while (= 1 (logand (getvar "CMDACTIVE") 1)) (command PAUSE))
      (setq nobj (vlax-ename->vla-object (entlast)))
      (if (= (vlax-get-property nobj 'ObjectName) "AcDbMLeader")
        (vlax-put-property nobj 'TextString nstrg)
        (exit)	   
        )
      (entdel (vlax-vla-object->ename oobj))
      (princ)
    )

  3. #3
    Woo! Hoo! my 1st post
    Join Date
    2009-03
    Posts
    1
    Login to Give a bone
    1

    Default Re: convert mtext to multileader

    Perfect!! This is exactly what I needed. Thanks for posting.

  4. #4
    Member
    Join Date
    2011-01
    Posts
    6
    Login to Give a bone
    0

    Default Re: convert mtext to multileader

    It`s a pity, but if the mtext contains field, after convertion to multileader, field becomes a simply text. Is there a possibility to repair this trouble?
    Thanks.

  5. #5
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,105
    Login to Give a bone
    0

    Default Re: convert mtext to multileader

    Quote Originally Posted by shartal672324 View Post
    It`s a pity, but if the mtext contains field, after convertion to multileader, field becomes a simply text. Is there a possibility to repair this trouble?
    Thanks.
    You could try changing this line of code:
    Code:
    (setq nstrg (vlax-get-property oobj 'TextString))
    with this line of code:
    Code:
    (setq nstrg (vlax-invoke-method oobj 'FieldCode))
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  6. #6
    Member
    Join Date
    2015-01
    Posts
    2
    Login to Give a bone
    0

    Default Re: convert mtext to multileader

    Quote Originally Posted by the_mini_guy View Post
    Hi,
    I was wondering if anyone has a lisp or vba to convery mtext (no leader) to multileader text (no leader)?

    Cheers
    TMG
    Which type lisp you looking...

  7. #7
    Woo! Hoo! my 1st post
    Join Date
    2012-12
    Posts
    1
    Login to Give a bone
    0

    Default Re: convert mtext to multileader

    The MT2ML lisp is great, or was great. This was working fine for a long time and then one day it stopped working. when i run MT2ML, i select Mtext and get this "Select source text: ; error: no function definition: VLAX-ENAME->VLA-OBJECT" Can anyone tell my why this is no longer working?

    Thanks,

  8. #8
    I could stop if I wanted to
    Join Date
    2001-12
    Location
    Dallas, TX
    Posts
    229
    Login to Give a bone
    0

    Default Re: convert mtext to multileader

    What version of AutoCAD are you using these days?

  9. #9
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    1

    Default Re: convert mtext to multileader

    Quote Originally Posted by ptortorice347608 View Post
    The MT2ML lisp is great, or was great. This was working fine for a long time and then one day it stopped working. when i run MT2ML, i select Mtext and get this "Select source text: ; error: no function definition: VLAX-ENAME->VLA-OBJECT" Can anyone tell my why this is no longer working?

    Thanks,
    As long as
    Code:
    (vl-load-com)
    is still the second line of the code there shouldn't be any problem.
    Check out https://forums.autodesk.com/t5/visua...000326#M296098

Similar Threads

  1. Convert MTEXT into a Multileader
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 5
    Last Post: 2014-08-27, 03:01 PM
  2. Setting up MText for Multileader?
    By greg.robson in forum ACA General
    Replies: 0
    Last Post: 2011-10-05, 10:11 PM
  3. Multileader lisp help (mtext problem)
    By framedNlv in forum AutoLISP
    Replies: 11
    Last Post: 2010-08-09, 11:13 PM
  4. Replies: 0
    Last Post: 2009-10-06, 08:45 PM
  5. convert leader to multileader???
    By guyver1 in forum AutoCAD General
    Replies: 6
    Last Post: 2007-07-06, 11:16 AM

Posting Permissions

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