Change text height to 2.5

Change text height to 2.5

WeTanks
Mentor Mentor
405 Views
3 Replies
Message 1 of 4

Change text height to 2.5

WeTanks
Mentor
Mentor

Hi,


Added video, I often operate.
Unify the text of various sizes into a height of 2.5.
Can it be achieved with LISP?

We.Tanks

EESignature

A couple of Fusion improvement ideas that could your vote/support:
図面一括印刷

Accepted solutions (1)
406 Views
3 Replies
Replies (3)
Message 2 of 4

ВeekeeCZ
Consultant
Consultant
Accepted solution

Possibly something like this

 

(defun c:ScaleWithTextReference ( / s p e c r)

  (if (and (setq s (ssget "_:L"))
	   (setq p (getpoint "\nSpecify base point: "))
	   (setq e (cond ((car (entsel "\nPick a reference text <any of selected>: ")))
			 ((ssname (ssget "_P" '((0 . "*TEXT"))) 0))))
	   (setq e (cdr (assoc 40 (entget e))))
	   (princ (strcat "\nPicked text of height: " (rtos e)))
	   (setq c (cond ((getreal "\nSpecify target scale <2.5>: ")) (2.5)))
	   (setq r (/ c e))
	   )
    (command "_.scale" s "" "_non" p r))
  (princ)
  )
  

 

Message 3 of 4

komondormrex
Mentor
Mentor

based on sample drawing

 

(defun c:scale_ref_25 (/ sset ref_point ref_text_size)
  (while (setq sset (ssget))
    (setq ref_point (getpoint "\nPick reference point for scaling: ")
    	  ref_text_size (cdr (assoc 40 (entget (car (entsel "\n Pick reference text: ")))))
    )
    (command "_scale" sset "" ref_point (/ 2.5 ref_text_size))
  )
  (princ)
)
0 Likes
Message 4 of 4

WeTanks
Mentor
Mentor

PERFECT!!!

どうもありがとうございました。

We.Tanks

EESignature

A couple of Fusion improvement ideas that could your vote/support:
図面一括印刷

0 Likes