Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Added video, I often operate.
Unify the text of various sizes into a height of 2.5.
Can it be achieved with LISP?
Solved! Go to Solution.
Hi,
Added video, I often operate.
Unify the text of various sizes into a height of 2.5.
Can it be achieved with LISP?
Solved! Go to 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) )
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)
)
PERFECT!!!
どうもありがとうございました。