Message 1 of 14
Rotate text according to ucs angle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, how are you?
I wanted to ask you a favor to improve a Lisp project I'm working on.
I've used the Plant command to rotate the screen according to the UCS.
I need to select some text so it appears horizontal, according to the UCS.
But I don't understand why it works with some text and not with others.
Here's a DWG file where I'm testing and the code I wrote.
(defun c:xxx (/ sel i e ang)
;
(setq sel (vl-catch-all-apply 'ssget (list '((0 . "MTEXT,TEXT")))))
;
; (setq ang (angle '(0 0 0) '(1 0 0)))
(setq ang (angle (trans '(0.0 0.0 0.0) 1 0) (trans '(1.0 0.0 0.0) 1 0)))
;
(repeat (setq i (sslength sel))
(setq e (entget (ssname sel (setq i (1- i)))))
(entmod (subst (cons 50 ang) (assoc 50 e) e)))
;
)
I'd appreciate any help you can give me.
AutoCAD 2026.1.1
Visual Studio Code 1.105.1
AutoCAD AutoLISP Extension 1.6.3
Windows 10 - 22H2 (64 bits)