How can make Text Alignment zero

How can make Text Alignment zero

jayhar
Advisor Advisor
2,034 Views
2 Replies
Message 1 of 3

How can make Text Alignment zero

jayhar
Advisor
Advisor
Hi, how can make Text Alignment Z value 0 in Properties. I am using AutoCAD 2015.
Please Subscribe YouTube Channel
https://www.youtube.com/channel/UCclj8v9vHQiFa8_DriuAk3w

Please Mark the Post or Posts as Solution(s) to help others find the answer quickly.
0 Likes
2,035 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

Simply select texts and show properties. In properties chart you can change Insertion point and Textalingment points Z values to 0. But with lisp it can be

 

(DEFUN c:textz ()
  (setq secim (ssget (list (cons 0 "TEXT"))))
  (setq secimlist (vl-remove-if 'listp (mapcar 'cadr (ssnamex secim))))
  (foreach obje secimlist
    (setq objevla (vlax-ename->vla-object obje))
    (if (= (vlax-get-property objevla 'Alignment) 0)
      (progn
        (setq point (vlax-safearray->list  (variant-value (vlax-get-property objevla 'InsertionPoint))))
        (setq point (vlax-3d-point (car point) (cadr point) 0))
        (vlax-put-property objevla 'InsertionPoint point)
        )
      (progn
        (setq point (vlax-safearray->list  (variant-value (vlax-get-property objevla 'TextAlignmentPoint))))
        (setq point (vlax-3d-point (car point) (cadr point) 0))
        (vlax-put-property objevla 'TextAlignmentPoint point)
        )
      )
    )
  )
      
        
0 Likes
Message 3 of 3

Kent1Cooper
Consultant
Consultant

@jayhar wrote:
Hi, how can make Text Alignment Z value 0 in Properties. ....

Clarify the question -- can you just pick in that slot and type in 0?  Or can you use FLATTEN?  Or are you looking for a way to do it to multiple Text objects in a routine, with which for some reason FLATTEN won't do what you need?  Or ... ?

Kent Cooper, AIA
0 Likes