Author Topic: MTEXT Editor to display current text  (Read 1374 times)

0 Members and 1 Guest are viewing this topic.

dubb

  • Swamp Rat
  • Posts: 1105
MTEXT Editor to display current text
« on: December 21, 2016, 02:13:06 PM »
When I input this into the command line, I don't see a LIVE output of what I am typing. Is there a setting for that?

Code: [Select]
(COMMAND "MTEXT" PAUSE "r" pause "c" "n" "w" "0")

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: MTEXT Editor to display current text
« Reply #1 on: December 22, 2016, 08:00:24 AM »
As an alternative:
Code - Auto/Visual Lisp: [Select]
  1. (defun c:mtx ( / a e p z )
  2.     (if (and (setq p (getpoint "\nSpecify insertion point: "))
  3.              (setq a (getangle "\nSpecify rotation: " p))
  4.         )
  5.         (progn
  6.             (setq z (trans '(0 0 1) 1 0 t)
  7.                   a (+ a (angle '(0 0) (trans (getvar 'ucsxdir) 0 z t)))
  8.                   e
  9.                 (entmakex
  10.                     (list
  11.                        '(000 . "MTEXT")
  12.                        '(100 . "AcDbEntity")
  13.                        '(100 . "AcDbMText")
  14.                        '(001 . "")
  15.                         (cons 010 (trans p 1 0))
  16.                         (cons 011 (trans (list (cos a) (sin a)) z 0 t))
  17.                         (cons 210 z)
  18.                     )
  19.                 )
  20.             )
  21.             (command "_.mtedit" e)
  22.         )
  23.     )
  24.     (princ)
  25. )

dubb

  • Swamp Rat
  • Posts: 1105
Re: MTEXT Editor to display current text
« Reply #2 on: December 22, 2016, 01:41:49 PM »
Thanks! Will try this.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: MTEXT Editor to display current text
« Reply #3 on: January 04, 2017, 11:21:01 AM »
Code: [Select]
(defun c:test (/ p r)
  (if (setq p (getpoint "\nSpecify first corner: "))
    (progn
      (setq r (cond ((getangle p "\nSpecify rotation angle <0d0'0\">: "))
                    (0.)
              )
      )
      (initdia)
      (command "_.mtext" "_non" p "_rotation" (* (/ r pi) 180.) "_columns" "_no" "_width" 0.)
    )
  )
  (princ)
)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox