+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Full Member
    Using
    AutoCAD 2009
    Join Date
    May 2011
    Posts
    70

    Default mtext in attribute

    Registered forum members do not see this ad.

    how to create a attribute with multiline text.
    get input from user(multi line) and make attrbute.

    in lisp

    (setq text(getstring "Enter text:"))
    (setq lp1 '(100 0 0)
    lp2'(0 100 0)
    )
    (command "attdef" "l" "m" "" "item" "item" text "" lp1 "h" 50 lp2)

    using this i could get one word as input.
    but i want multi line text as input.

    pls help.
    Last edited by kalai; 3rd Sep 2011 at 06:28 am.

  2. #2
    Forum Deity pBe's Avatar
    Computer Details
    pBe's Computer Details
    Operating System:
    Windows XP
    Discipline
    Construction
    pBe's Discipline Details
    Discipline
    Construction
    Details
    Camp Construction planning and details
    Using
    AutoCAD 2009
    Join Date
    Apr 2010
    Posts
    2,089

    Default

    Code:
     
    (setq text(getstring T "Enter text:"))

  3. #3
    Full Member
    Using
    AutoCAD 2009
    Join Date
    May 2011
    Posts
    70

    Default

    thanks ,it works

  4. #4
    Forum Deity Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draftsman
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Oct 2009
    Location
    Lives in Abu Dhabi
    Posts
    2,616

    Default

    How the description of (multi line) means space ?
    - When aim is being settled in my mind , I have to reach it and get it in hand whatever it costs and wherever it is and will never give up . Tharwat said

  5. #5
    Full Member
    Using
    AutoCAD 2009
    Join Date
    May 2011
    Posts
    70

    Default

    tharwat,

    mutiple words with space in between

  6. #6
    Forum Deity pBe's Avatar
    Computer Details
    pBe's Computer Details
    Operating System:
    Windows XP
    Discipline
    Construction
    pBe's Discipline Details
    Discipline
    Construction
    Details
    Camp Construction planning and details
    Using
    AutoCAD 2009
    Join Date
    Apr 2010
    Posts
    2,089

    Default

    Quote Originally Posted by Tharwat View Post
    How the description of (multi line) means space ?
    If you read the first post the OP is wondering why it only accepts one word.

    Quote Originally Posted by kalai View Post
    tharwat,

    mutiple words with space in between
    yeah.. that

  7. #7
    Forum Deity Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draftsman
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Oct 2009
    Location
    Lives in Abu Dhabi
    Posts
    2,616

    Default

    Quote Originally Posted by pBe View Post
    If you read the first post the OP is wondering why it only accepts one word.
    Frankly , I thought that they want multiple lines of texts as the command Mtext .

    Cheers .
    - When aim is being settled in my mind , I have to reach it and get it in hand whatever it costs and wherever it is and will never give up . Tharwat said

  8. #8
    Forum Deity pBe's Avatar
    Computer Details
    pBe's Computer Details
    Operating System:
    Windows XP
    Discipline
    Construction
    pBe's Discipline Details
    Discipline
    Construction
    Details
    Camp Construction planning and details
    Using
    AutoCAD 2009
    Join Date
    Apr 2010
    Posts
    2,089

    Default

    Quote Originally Posted by Tharwat View Post
    Frankly , I thought that they want multiple lines of texts as the command Mtext .

    Cheers .
    (command "attdef" "l" "m" "" "item" "item" text "" lp1 "h" 50 lp2)<-- the "m" will take care of that Tharwat

  9. #9
    Super Moderator SLW210's Avatar
    Computer Details
    SLW210's Computer Details
    Operating System:
    Windows 7 PRO
    Computer:
    IBM Lenovo
    Motherboard:
    ACPI x86
    CPU:
    Pentium(R) Dual-Core CPU E5500 @ 2.80GHz
    RAM:
    4 GB RAM
    Graphics:
    Nvidia Quadro 600 1GB
    Primary Storage:
    300 GB
    Secondary Storage:
    650GB
    Monitor:
    ThinkVision 22"
    Discipline
    Multi-disciplinary
    SLW210's Discipline Details
    Occupation
    Design Draftsman
    Discipline
    Multi-disciplinary
    Details
    Mostly do drafting related to manufacturing. From doing site layouts with proposed updates, additions and renovations to be budgeted and submitted for bid, to updating and changing existing drawings to reflect maintenance and repair/revision work done on site.
    Using
    AutoCAD 2011
    Join Date
    May 2007
    Location
    South Florida, USA
    Posts
    9,092

    Default

    Please read the CODE POSTING GUIDELINES.
    “A narrow mind and a fat head invariably come on the same person” Zig Zigler



  10. #10
    Forum Deity BlackBox's Avatar
    Using
    Civil 3D 2011
    Join Date
    Nov 2009
    Posts
    3,932

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by SLW210 View Post
    Please read usethe CODE POSTING GUIDELINES.
    Fixed that for ya
    "Potential has a shelf life." - Margaret Atwood

Similar Threads

  1. CopyText.lsp: Copy/Swap Text/MText/Multileader/Attribute Values
    By alanjt in forum AutoLISP, Visual LISP & DCL
    Replies: 69
    Last Post: 20th Jul 2012, 06:23 pm
  2. Sum Numbers in Mtext Fields to Mtext Field
    By muurr in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 5th Mar 2011, 08:31 pm
  3. Can I change Mtext or Dtext into a Defined Attribute?
    By magwea in forum AutoCAD Beginners' Area
    Replies: 8
    Last Post: 27th May 2009, 09:57 pm
  4. 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
  5. MTEXT created in same MTEXT editor on different layers?
    By hyposmurf in forum AutoCAD General
    Replies: 2
    Last Post: 5th Sep 2003, 12:54 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