• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Visual LISP, AutoLISP and General Customization

    Reply
    Distinguished Mentor
    braudpat
    Posts: 578
    Registered: ‎12-15-2006

    Re: rotating attribute text horizontal

    01-18-2013 09:25 AM in reply to: rodb

     

    Hello

     

    An other routine : a little bit different that I am using sometimes !

    coming from a french forum www.cadxp.com (Author: Patrick_35)

     

    ROT0 : all attributs will be horizontal for the next insert ...

     

    SROT0 : disable this special feature for the next insert ...

     

    Bye, Patrice 

     

     

    ;;;
    ;;;=================================================================
    ;;;
    ;;; ROT_0.LSP v2.00
    ;;;
    ;;; Laisser l'Angle de Rotation à 0 de TOUS les attributs
    ;;;
    ;;; Copyright (C) Patrick_35
    ;;;
    ;;;=================================================================
    ;;;
    ;;; Commande :   ROT0   Pour mettre les Attributs a l'horizontale
    ;;;
    ;;; Commande :  SROT0   Pour revenir a la NORMALE ...
    ;;;
    
    
    (defun Attributs_rot_0(rea obj / att)
      (cond
        ((eq (cdr (assoc 0 (entget (cadr obj)))) "INSERT")
          (foreach att (vlax-invoke (vlax-ename->vla-object (cadr obj)) 'getattributes)
    	(vla-put-rotation att 0)
          )
        )
      )
    )
    
    
    (defun c:rot0()
      (if mrea_rot0
        (princ "\n\tL'Angle des Attributs = 0 est déjà activée ")
        (progn
          (setq mrea_rot0 (vlr-acdb-reactor nil '((:vlr-objectModified . Attributs_rot_0)(:vlr-objectAppended . Attributs_rot_0))))
          (princ "\n\tActivation de l'Angle des Attributs à 0 ")
        )
      )
      (princ)
    )
    
    
    (defun c:srot0()
      (if mrea_rot0
        (progn
          (vlr-remove mrea_rot0)
          (setq mrea_rot0 nil)
          (princ "\n\tDésactivation de l'Angle = 0 des Attributs ")
        )
        (princ "\n\tL'Angle des Attributs = 0 est déjà désactivé ")
      )
      (princ)
    )
    
    
    (vl-load-com)
    (princ (strcat "\n\tPour activer l'Angle des Attributs à 0, lancez la commande ROT0 \n\tPour revenir à la NORMALE, faites la commande SROT0 "))
    (princ)
    
     

     

     

     

     

    Please use plain text.
    Valued Contributor
    Posts: 50
    Registered: ‎03-24-2009

    Re: rotating attribute text horizontal

    01-18-2013 10:03 AM in reply to: braudpat

    Thanks for that, an interesting option!

    Please use plain text.