;;---------=={ Set MLeader Block Attribute Value }==----------;;
;; ;;
;; Sets the value of the specified tag for the specified ;;
;; MLeader ;;
;;------------------------------------------------------------;;
;; Author: Lee McDonnell, 2010 ;;
;; ;;
;; Copyright © 2010 by Lee McDonnell, All Rights Reserved. ;;
;; Contact: Lee Mac @ TheSwamp.org, CADTutor.net ;;
;;------------------------------------------------------------;;
;; Arguments: ;;
;; mleader - ename/VLA-Object MLeader with attributed block ;;
;; tag - Tagstring of the attribute to change ;;
;; value - Value to which attribute will be set ;;
;;------------------------------------------------------------;;
;; Returns: nothing ;;
;;------------------------------------------------------------;;
(defun lm:_rjp_mod_setmleaderblockattributevalue
(mleader value
/ def id exval
) ;; © Lee Mac 2010
)
)
)
)
(= 1 (vla-get-contenttype mleader))
(vla-get-contentblockname mleader)
)
)
)
;; RJP mod to get existing value and add a new value to it
(setq exval
(vla
-getblockattributevalue mleader id
)) )
)
)
)
)
)
;;-----------------------=={ Itemp }==------------------------;;
;; ;;
;; Retrieves the item with index 'item' if present in the ;;
;; specified collection, else nil ;;
;;------------------------------------------------------------;;
;; Author: Lee McDonnell, 2010 ;;
;; ;;
;; Copyright © 2010 by Lee McDonnell, All Rights Reserved. ;;
;; Contact: Lee Mac @ TheSwamp.org, CADTutor.net ;;
;;------------------------------------------------------------;;
;; Arguments: ;;
;; coll - the VLA Collection Object ;;
;; item - the index of the item to be retrieved ;;
;;------------------------------------------------------------;;
;; Returns: the VLA Object at the specified index, else nil ;;
;;------------------------------------------------------------;;
(defun lm:itemp
(coll item
) ;; © Lee Mac 2010
)
item
)
)
(defun c:test
(/ e i n ss
) (setq ss
(ssget ":L" '
((0 .
"multileader")))) )
(lm:_rjp_mod_setmleaderblockattributevalue
(ssname ss
(setq i
(1- i
))) n
) )
)
)