+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Forum Newbie
    Using
    AutoCAD 2010
    Join Date
    Jan 2012
    Posts
    6

    Default Mtext - Insert hard return

    Registered forum members do not see this ad.

    AutoCAD 2010
    I have researched inserting a hard return into mtext and can’t seem to get it to work.

    I have the MTEXTED set to internal if that matters.

    My google searches have indicated that using \\P, \P (capital P) or \n will result in a hard carriage return but I cannot get it to work in either fashion.

    We have well over 200 separate standard text entities that need to be consolidated into a single mtext, with a hard return after each line. It is a tree list for a large site.

    I have appended a “?” to the end of each individual line (using a LISP I found), in the hopes that I can combine them all into an mtext, and find/replace the “?” with a hard return and my googling has indicated that it is as easy as using \\P, but I am having no luck with any codes I have found in my searches.

    This issue will come up again and I want to find a solution.

    Any help would be appreciated.

  2. #2
    Super Member CyberAngel's Avatar
    Computer Details
    CyberAngel's Computer Details
    Operating System:
    Windows XP Pro
    Computer:
    Dell Optiplex 330
    Discipline
    Civil
    CyberAngel's Discipline Details
    Occupation
    Civil Drafter
    Discipline
    Civil
    Using
    Civil 3D 2013
    Join Date
    Jul 2006
    Location
    Anywhere Else
    Posts
    976

    Default

    Not sure what's going on here. The \P character gives you a return in text, not mtext. To put a return in mtext, press the return key. Have you tried ^P instead of \P in mtext?
    breaking AutoCAD on a regular basis since 1991

  3. #3
    Forum Deity
    Using
    AutoCAD 2002
    Join Date
    Sep 2006
    Location
    East Sussex, U.K.
    Posts
    2,968

    Default

    It is a pity that all the tree names were not in ordinary text, because the ExpressTools function Text2Mtext does exactly what you want as long as you uncheck the option to create word-wrap Mtext.

    Perhaps you could explode all the Mtext to make use of it?
    Attached Images

  4. #4
    Forum Newbie
    Using
    AutoCAD 2010
    Join Date
    Jan 2012
    Posts
    6

    Default

    Thank you so much!

    That did the trick. I never knew that Mtext had "Options". I just usually type the command and select the text. You have made my coworker very happy, and I learned something new today, even though I try very hard not to

    While it did work, I would still like to solve my original issue, as I have needed to do that in the past and never found a solution.

    Thanks again and I hope the rest of my friday goes as smooth.

  5. #5
    Forum Deity Dadgad's Avatar
    Using
    AutoCAD 2012
    Join Date
    Nov 2011
    Location
    At the confluence of worthlessness & invaluability
    Posts
    3,134

    Default

    Registered forum members do not see this ad.

    Volume and repetition do not validate opinions forged in the absence of thought.

Similar Threads

  1. LISP to insert two attributes, pline length, and mtext into block
    By chelsea1307 in forum AutoLISP, Visual LISP & DCL
    Replies: 23
    Last Post: 1st Jun 2011, 03:00 pm
  2. Insert Text - Mtext
    By doru10 in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 1st Jun 2011, 11:02 am
  3. Hard or Carraige Return or Enter on command line
    By SlipShadow in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 14th Dec 2009, 06:56 pm
  4. Search AutoCAD MText for a Carriage Return
    By TriO in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 11th Sep 2008, 01:37 pm
  5. Insert MText with zero width
    By thalon in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 15th Aug 2008, 03:19 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