2 lined dim text

Discussion in 'AutoCAD' started by czugelder, Aug 9, 2004.

  1. czugelder

    czugelder Guest

    I am able to add text to the dim text already entered but cannot
    get it to wrap to 2 lines. I tried using chr 92 to get the wrap
    below is the code.
    I am putting in the dim from lisp, and want the autocad dim, but
    need to add a second line of text.

    (defun zDIMdata ()
    ;***THIS REPLACES dim text CUTLENGTH DATA***
    (setq fixent (entsel))
    (setq pnt1 (car (cdr fixent)))
    (setq b (car fixent))
    (setq fixent (entget b))
    (setq sptxt (strcat sptxt "first" (chr 92) "his"));TRIED USING CHR 92 TO GET WRAP
    (setq dimt2 sptxt)
    ;(setq dimt2 (getstring 1 "ENTER NEW DIM TEXT: "))(terpri)

    (setq fixent
    (subst (cons 1 sptxt)(assoc 1 fixent) fixent))(entmod fixent)

    (setq newent (append fixent exdata));appends new data list to entity list
    (entmod newent);modifies the entity with the new definition
    )
     
    czugelder, Aug 9, 2004
    #1
  2. czugelder

    Chuck Guest

    Try "<backslash><backslash>P" instead of chr 92.
     
    Chuck, Aug 9, 2004
    #2
  3. czugelder

    T.Willey Guest

    What is the value of "sptxt" pior to this routine because you are trying to asign sptxt to a string with itself being the first string, but when I run this sptxt never is set.

    Tim
     
    T.Willey, Aug 9, 2004
    #3
  4. czugelder

    czugelder Guest

    Thank you for the help.
     
    czugelder, Aug 11, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.