Results 1 to 2 of 2

Thread: Splitting multiline text

  1. #1
    Member
    Join Date
    2007-08
    Posts
    6

    Default Splitting multiline text

    I want to split text obtained from multitext.

    It looks like that "aa\Pbb"

    Lines are separated with "\P"

    But "wcmatch" doesn't see it. I can't use "substr" also. How to obtain each part of multiline text?

  2. #2
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,519

    Exclamation Re: Splitting multiline text

    Quote Originally Posted by pawel-l View Post
    I want to split text obtained from multitext.

    It looks like that "aa\Pbb"

    Lines are separated with "\P"

    But "wcmatch" doesn't see it. I can't use "substr" also. How to obtain each part of multiline text?
    This works:

    Code:
    
    
    (setq sel (entsel "\nSelect: "))
    (setq ent (car sel))
    (setq lst (entget ent))
    (setq str (cdr (assoc 1 lst)))
    (vl-string-search "\\P" str)
    
    
    You'll have to put that last line in a loop to catch subsequent returns. Also be aware that for MTEXT strings longer than 250 characters, additional text is stored in group 3 entries (as many as needed)

Similar Threads

  1. Multiline Text Bug
    By Jack Cheong in forum AutoCAD General
    Replies: 0
    Last Post: 2009-07-23, 07:28 AM
  2. TEXT - Single to Multiline
    By Hotpants Longbottom in forum AutoCAD General
    Replies: 4
    Last Post: 2008-08-27, 09:26 PM
  3. Multiline Text Editor truncating imported text file
    By zellingj in forum AutoCAD General
    Replies: 3
    Last Post: 2006-12-06, 09:28 PM
  4. Single line Text or Multiline Text
    By Spenner in forum AutoCAD General
    Replies: 29
    Last Post: 2006-06-02, 11:21 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
  •