Help with tx2mtx

Discussion in 'AutoCAD' started by Steven (remove wax for reply), Aug 6, 2003.

  1. I use AutoCAD LT 2000i. I needed a LISP interpreter to run one of
    several functions, to combine multiple TEXT entities into one MTEXT.

    My LT now does LISP, thanks to David T (dtrotzjr) for helping me find
    LT Boost (http://www.cadaware.com/download.htm).

    Next I found a couple of LISP programs to do the job. The one I'm
    using right now is TX2MTX, available at several locations:

    http://www.cogosoftware.com/downl.html

    It only has one problem. It is supposed to leave the resulting MTEXT
    entity on the same layer that the TEXT entities came from.

    Instead, the new MTEXT is on layer 0.

    I don't know enough LISP to figure out what's happening. I suspect
    that there might be a change between R14 and R2000 that is
    responsible. Can somebody look at the LISP code and see? Any other
    suggestions also welcome.

    Steven
     
    Steven (remove wax for reply), Aug 6, 2003
    #1
  2. Steven (remove wax for reply)

    Jeff Guest

    Steven,
    Just change the 2 lines dated 8/6/03 and it should be good to go....

    ;set the layer and color
    ;;(setvar "CLAYER" text_layr) rem'ed by Jeff Mishler 8/6/03
    (if text_colr;if color in entity list
    (setvar "CECOLOR" (itoa text_colr))
    )
    ;erase selected text
    (command ".erase" sst2 "")
    ;;;;;;;;;;
    ;;;;;;;;;;
    ;insert mtext
    ; (command ".-mtext"
    ; text_inse "a" text_atch "s" text_styl "h" text_heig "w" text_widt
    text_strg "")
    ;;;;;;;;;;
    ;;;;;;;;;; the following was added by Dave Perry 12/2/98.
    (setq dp2 (strlen text_strg))
    (while (> dp2 250)
    (setq str1 (substr text_strg 1 250))
    (setq text_strg (substr text_strg 251))
    (setq dp2 (strlen text_strg))
    (setq dp1 (append dp1 (list (cons 3 str1))))
    );while
    (setq dp1 (append dp1 (list (cons 1 text_strg))))
    (entmake (append (list '(0 . "MTEXT")
    '(100 . "AcDbEntity")
    '(67 . 0)
    (cons 8 text_layr);;modified 8/6803 by Jeff Mishler
    '(100 . "AcDbMText")
     
    Jeff, Aug 7, 2003
    #2
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.