Jump to content

about Text size


SatoshiQ

Recommended Posts

with dimension, I just create 1:1 scale and then use the "use overall scale of" option.

 

But I don't know how to deal with text. I created new text style, leave the text high "0.00". Use MTEX command, the text high show 2.5 and it always too small.

Link to comment
Share on other sites

Hello SatoshiQ, and welcome in the forum!

I don't really understand your question. You are happy with the dimension texts but not with mtexts?

How about this: draw a dimension and explode it. Check the text size and apply that size to your mtexts. Or even shorter, once you exploded the dimension as above, use the MATCHPROP command to make the mtext to look like the dimension text.

Link to comment
Share on other sites

15 hours ago, SatoshiQ said:

I created new text style, leave the text high "0.00". Use MTEXT command, the text high show 2.5 and it always too small.

Your TEXTSIZE (System Variable) must be set to 2.5

Divide the height you want by the CANNOSCALEVALUE (System Variable) to get the TEXTSIZE you want.

I've always use this lisp for setting the TEXTSIZE to 0.1 with option to get the value by selecting an existing text.

;| Text size - This one you can get text size by picking text, entering a value, picking two points,
    or it will calculate it from CANNOSCALEVALUE if in Model Space.  It doesn't change on Escape.
   (load "TXTsize.LSP") tas ;
   by: Tom Beauford
   Leon County Public Works Engineering
===============================================|;
(defun C:tas (/ *error* vars tnt ts txt etp style)
  (setq vars (mapcar '(lambda (x) (cons x (getvar x))) '("luprec" "modemacro" "cmdecho")))
  (defun *error* (msg)
    ;; Reset variables
    (mapcar '(lambda (x) (setvar (car x) (cdr x))) vars)
    (if (not (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*"))
      (princ (strcat "\nError: " msg))
    )
    (princ)
  )

  (setvar "luprec" 8)
  (setvar "cmdecho" 0)
  (grtext -1 "Select Text, Mtext or Attribute. Enter for more Options.")
  (setq tnt(nentsel "\nSelect Text Entity: "))
  (cond
	((= 1 (getvar "cvport"))(setq ts "0.1"))
	((= 1 (getvar "TILEMODE"))(setq ts (rtos(/ 0.1 (getvar 'cannoscalevalue))2 3)))
	(T(setq ts (rtos(/(caddr (trans '(0 0 1) 3 2))10)2 3)))
  )
  (if (= "0" (substr ts (strlen ts)))
    (while (= (atof ts)(atof (substr ts 1 (- (strlen ts)1))))
      (setq ts(substr ts 1 (- (strlen ts)1)))
    );while
  );if
  (setq txt (strcat"\nChange Text Size from " (rtos(getvar "textsize")) " to :<" ts "> "))
  (if tnt (setq etp (cdr(assoc 0 (entget(car tnt))))))
  (if (or(= "TEXT" etp)(= "MTEXT" etp)(= "ATTRIB" etp))
    (progn
      (setq style (getvar "textstyle")
            style (tblobjname "style" style)
            xdata (cadr (assoc -3 (entget style '("AcadAnnotative"))))
            tnt(cdr(assoc 40 (entget (car tnt))))
      );setq
      (if(and xdata (= (cdr (nth 4 xdata)) 1))
        (setq tnt(* tnt (getvar "cannoscalevalue")))
      );if
    );progn
    (progn
      (grtext -1 "Enter Size, Pick 2 Points or Accept Default.")
      (setq tnt (getdist txt))
    );progn
  );if
  (if (or(= tnt nil)(= tnt 0.0))
    (setq tnt (atof ts))
  );if
    (setvar "textsize" tnt)
  (setq tnt (rtos(getvar "textsize")))
  (if (= "0" (substr tnt (strlen tnt)))
    (while (= (atof tnt)(atof (substr tnt 1 (- (strlen tnt)1))))
      (setq tnt(substr tnt 1 (- (strlen tnt)1)))
    );while
  );if
  (mapcar '(lambda (x) (setvar (car x) (cdr x))) vars)
  (grtext -1 "") ;Clear status line
  (vl-cmdf "redraw")
  (princ)
)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...