+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20
  1. #1
    Super Member
    Using
    not specified
    Join Date
    Feb 2006
    Posts
    527

    Default Convert text to mtext in lisp?

    Registered forum members do not see this ad.

    Subject Convert text to mtext in lisp?
    What lisp command to convert strings to mtext?

    I am looking for (or maybe making) a lisp routine that would change text
    to mtext by allowing the user to select a group of strings in a drawing.
    The routine would change the first text string to mtext then
    allow the user edit that string. Then the routine would go down to the second string to make a mtext conversion then let the user edit that string. Then the rountine would to the the third string and so on. Hopefully the routine would move form left to right then down. Simular movement as reading a book. Has anyone done this??

    First things first, Does anyone know a lisp command to convert text to mtext?


    thank you,
    Last edited by muck; 24th Sep 2007 at 08:53 pm.

  2. #2
    Luminous Being StykFacE's Avatar
    Computer Details
    StykFacE's Computer Details
    Operating System:
    Windows 7 Ultimate 64bit
    Computer:
    Dell Precision T3500
    Discipline
    Multi-disciplinary
    StykFacE's Discipline Details
    Occupation
    BIM Manager & Design Specialist
    Discipline
    Multi-disciplinary
    Details
    Facilities engineering, involving mechanical piping, mechanical HVAC and electrical engineering.
    Using
    Revit 2013
    Join Date
    Mar 2006
    Location
    Dallas, TX - USA
    Posts
    6,584

    Default

    what version of CAD are you running? If it's the full version, then you probably already have this feature via Express Tools. type TXT2MTXT at the command line and follow the prompt.

    Tannar Frampton | Facilities Engineering | Revit 2013
    Personal Projects | Fender Squier Stratocaster | Custom Smoker | Concrete Patio

  3. #3
    Super Member
    Using
    not specified
    Join Date
    Feb 2006
    Posts
    527

    Default

    AutoCAD Version 2007. I noticed when a person uses a pull down (ie txt2mtxt) menu to select a group of texts strings the command will put all the strings into one mtext box. Usually the top mtext box. I really don't want that. If I select 10 text strings to convert to mtext I would like to get 10 mtext boxes in there orginal postions by window picking a group of text strings. Hopefully the mtext would be in the same positions as the previous
    text strings.
    thank you,

  4. #4
    Super Member Raggi_Thor's Avatar
    Using
    AutoCAD 2008
    Join Date
    Aug 2007
    Location
    Trondheim, NORWAY
    Posts
    718

    Default

    That can be done in lisp, but most people wanted to group severeal dtexts into one mtext.

    What bout this: run the command txt2mtxt, select one text, then press enter to repeat and select the next and so on?
    Mvh, Kvedja, Kind Regards,
    Ragnar Thor Mikkelsen
    http://www.DESIGNDATA.no/English.htm

  5. #5
    Forum Deity
    Using
    Civil 3D 2008
    Join Date
    Sep 2006
    Location
    Pittsburgh, PA, USA
    Posts
    3,581

    Default

    Quote Originally Posted by muck View Post
    If I select 10 text strings to convert to mtext I would like to get 10 mtext boxes in there orginal postions by window picking a group of text strings.
    Try this...
    Code:
    ;changes text to individual mtext by Carl B.
    
    (princ "\nType T2M to start")
    (defun c:t2m ()
      (setq Tset (ssget '((0 . "*TEXT"))))   ;filter text in selection set
                        
      (setq    Setlen (sslength Tset)       ;setq number of entties in selection set, setq count(er) to 0
        Count  0
      )
                        
      (repeat SetLen                             ;repeat setq times
                        
        (setq Ename (ssname Tset Count))   ;setq ename to be the "0..." entity in selection set Tset
                        
        (command "_txt2mtxt" Ename "")
        (setq Count (+ 1 Count))                  ; add 1 to Count(er)
                        
      )                ; Repeat    
      (princ)
    )

  6. #6
    Super Member
    Using
    not specified
    Join Date
    Feb 2006
    Posts
    527

    Default

    I will try the above code and see what it does.
    Here is one thing I have found.

    (command "txt2mtxt" "")
    ;Opens Mtext Conversion options dialog. If I turn off wordwrap
    ;feature in the dialog box my window conversions will keep the text in
    ;place but I don't know how to turn off that the wordwrap
    ;feature using lisp. Interesting Information.

  7. #7
    Super Moderator rkmcswain's Avatar
    Computer Details
    rkmcswain's Computer Details
    Operating System:
    Windows 7 Pro x64
    Motherboard:
    Intel DZ77RE-75K
    CPU:
    i7-3770K 3.50GHz
    RAM:
    32GB
    Graphics:
    Nvidia Quadro 2000
    Primary Storage:
    125GB SSD
    Secondary Storage:
    500GB SATA
    Monitor:
    ASUS 27" / ASUS 24"
    Discipline
    Civil
    Using
    Civil 3D 2013
    Join Date
    Sep 2005
    Location
    Houston
    Posts
    3,639

    Default

    Quote Originally Posted by muck View Post
    I am looking for (or maybe making) a lisp routine that would change text to mtext by allowing the user to select a group of strings in a drawing.
    ToolPac includes a routine to convert multiple TEXT entities to MTEXT, without combining them.

  8. #8
    Forum Newbie
    Using
    AutoCAD 2006
    Join Date
    Sep 2007
    Posts
    2

    Default changing high mtext

    Quote Originally Posted by Raggi_Thor View Post
    That can be done in lisp, but most people wanted to group severeal dtexts into one mtext.

    What bout this: run the command txt2mtxt, select one text, then press enter to repeat and select the next and so on?

    I read this and I would like to know if there are some lsp routine to change the high of mtext at same time, por example, if I have 10 mtext box, but with differents highs, select all of them and give them the same high, and keeping the same start point.

    Thank for the help!!

    Oskr

  9. #9
    Super Member Raggi_Thor's Avatar
    Using
    AutoCAD 2008
    Join Date
    Aug 2007
    Location
    Trondheim, NORWAY
    Posts
    718

    Default

    Yes, it's possible but the problem with Mtext is that you can have all kinds of format overrides inside the text.
    If the Mtexts are all with default formatting, you can use the Properties window to change the hight.
    Mvh, Kvedja, Kind Regards,
    Ragnar Thor Mikkelsen
    http://www.DESIGNDATA.no/English.htm

  10. #10
    Super Member
    Using
    not specified
    Join Date
    Feb 2006
    Posts
    527

    Default Matching Mtext

    Registered forum members do not see this ad.

    Biggest problem I have is matching mtext widths with orginal text withs
    after converting text to mtext.
    thank you,

Similar Threads

  1. Can Lisp use mtext to make multi string mtext editor?
    By muck in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 18th Dec 2006, 03:22 am
  2. Convert Text to Mtext
    By CAD-e-Corner in forum AutoCAD RSS Feeds
    Replies: 0
    Last Post: 5th Sep 2006, 09:14 pm
  3. convert text to mtext in 2000
    By andyboy in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 7th Jul 2006, 02:26 am
  4. LT 2006- text to mtext lisp,
    By RONQUITECT in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 15th Apr 2006, 03:29 am
  5. Is it possible to convert DText to MText universally
    By TateCE in forum AutoCAD Drawing Management & Output
    Replies: 3
    Last Post: 16th Dec 2005, 02:44 pm

Bookmarks

Posting Permissions

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