;;-------------------=={ Match Attribs }==--------------------;;
;;                                                            ;;
;;  Prompts for selection of source attribute, then proceeds  ;;
;;  to match the listed properties for subsequently picked    ;;
;;  attributes.                                               ;;
;;------------------------------------------------------------;;
;;  Author: Lee Mac, Copyright © 2010 - www.lee-mac.com       ;;
;;------------------------------------------------------------;;

(defun c:lm_MatchAttribs ( / old_cmd properties source )
  (mini_start nil)

  (setq properties
   '(
     Backward
     Height
     Layer
     Linetype
     LinetypeScale
     Lineweight
     ObliqueAngle
     Rotation
     ScaleFactor
     StyleName
     Thickness
     UpsideDown
    )
  )

  (if (setq source (car (mai_Entsel T  "Ñ¡ÔñÓÃÀ´ÐÞ¸ÄÆäËû¿éÄÚÊôÐÔµÄÔ­Ê¼ÊôÐÔ:" "Ã»ÓÐÑ¡Ôñµ½ÊôÐÔ:" '((0 . "ATTRIB")) nil)))
    (
      (lambda ( properties values / dest )
        (while
          (setq dest (car (mai_Entsel T  "Ñ¡ÔñÐèÒªÐÞ¸ÄµÄÊôÐÔ:" "Ã»ÓÐÑ¡Ôñµ½ÊôÐÔ:" '((0 . "ATTRIB")) nil)))
          (setq dest (vlax-ename->vla-object dest))
          (mapcar '(lambda ( x y ) (vlax-put-property dest x y)) properties values)
        )
      )
      properties
      (progn (setq source (vlax-ename->vla-object source))
        (mapcar '(lambda(x) (vlax-get-property source x)) properties)
      )
    )
  )
  (mai_end)
)
