[wanted] Lisp to create Mtext with superscript

Discussion in 'AutoCAD' started by Ken, Mar 16, 2005.

  1. Ken

    Ken Guest

    Dear all,

    Anyone have a lisp to create Mtext with superscript?

    thanks,

    Ken
     
    Ken, Mar 16, 2005
    #1
  2. Ken

    Casey Guest

    Not a lisp, but a quick trick if you like....

    http://www.dotsoft.com/acadfaq.htm

    scroll down or seach on the page for superscript.

    Works pretty slick for my needs anyway.

    Casey
     
    Casey, Mar 16, 2005
    #2
  3. From Casey's tip from Dotsoft:

    (Defun c:ss ()
    (setq e (entsel "Select MTEXT: "))
    (if e
    (progn
    (setq e (car e))
    (setq ve (vlax-ename->vla-object e))
    (setq txt (vla-get-textstring ve))
    (setq txt (vl-string-subst "{\\H0.75x;\\S2^ ;}" "^2" txt))
    (setq ve (vla-put-textstring ve txt))
    )
    )
    )
     
    Allen Johnson, Mar 16, 2005
    #3
  4. Ken

    Casey Guest

    Pretty cool Allen, how could you modify it so it will change multiple
    instances of '^2' in a single mtext entity?
     
    Casey, Mar 16, 2005
    #4
  5. Ken

    Ken Guest

    Thanks, Allen!

    This is a good lisp program, but not satify my requirement.
    very good try!

    thx

    Ken
     
    Ken, Mar 18, 2005
    #5
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.