(defun LM:vl-getattributevalue ( blk tag )
  Get Attribute Value   -    
  ;; Returns the value held by the specified tag within the supplied block, if present.
  ;; blk - [vla] VLA Block Reference Object
  tag - [ str ] Attribute TagString
  ;; Returns: [str] Attribute value, else nil if tag is not found.

    (setq tag (strcase tag))
    (vl-some '(lambda ( att ) (if (= tag (strcase (vla-get-tagstring att))) (vla-get-textstring att)))
        (vlax-invoke blk 'getattributes)
    )
)
(defun LM:vl-setattributevalue ( blk tag val )
  Set Attribute Value   -    
  Sets the value of the first attribute with the given tag found within the block , if present .
  ;; blk - [vla] VLA Block Reference Object
  tag - [ str ] Attribute TagString
  ;; val - [str] Attribute Value
  ;; Returns: [str] Attribute value if successful, else nil.

    (setq tag (strcase tag))
    (vl-some
       '(lambda ( att )
            (if (= tag (strcase (vla-get-tagstring att)))
                (progn (vla-put-textstring att val) val)
            )
        )
        (vlax-invoke blk 'getattributes)
    )
)
(defun LM:vl-setattributevalues ( blk lst / itm )
  Set Attribute Values   -    
  ;; Sets attributes with tags found in the association list to their associated values.
  ;; blk - [vla] VLA Block Reference Object
  lst - [ lst ] Association list of ( ( < tag > . < value > ) ... )
  ;; Returns: nil

    (foreach att (vlax-invoke blk 'getattributes)
        (if (setq itm (assoc (vla-get-tagstring att) lst))
            (vla-put-textstring att (cdr itm))
        )
    )
)
(defun LM:vl-getattributes ( blk )
  Get Attributes   -    
  ;; Returns an association list of attributes present in the supplied block.
  ;; blk - [vla] VLA Block Reference Object
  Returns : [ lst ] Association list of ( ( < Tag > . < Value > ) ... )

    (mapcar '(lambda ( att ) (cons (vla-get-tagstring att) (vla-get-textstring att)))
        (vlax-invoke blk 'getattributes)
    )
)

 Returns the value held by the specified tag within the supplied block, if present.
 blk - [vla] VLA Block Reference Object
 Returns: [str] Attribute value, else nil if tag is not found.
 blk - [vla] VLA Block Reference Object
 val - [str] Attribute Value
 Returns: [str] Attribute value if successful, else nil.
 Sets attributes with tags found in the association list to their associated values.
 blk - [vla] VLA Block Reference Object
 Returns: nil
 Returns an association list of attributes present in the supplied block.
 blk - [vla] VLA Block Reference Object
(defun LM:vl-getattributevalue ( blk tag )
  Get Attribute Value   -    
  tag - [ str ] Attribute TagString

    (setq tag (strcase tag))
    (vl-some '(lambda ( att ) (if (= tag (strcase (vla-get-tagstring att))) (vla-get-textstring att)))
        (vlax-invoke blk 'getattributes)
    )
)
(defun LM:vl-setattributevalue ( blk tag val )
  Set Attribute Value   -    
  Sets the value of the first attribute with the given tag found within the block , if present .
  tag - [ str ] Attribute TagString

    (setq tag (strcase tag))
    (vl-some
       '(lambda ( att )
            (if (= tag (strcase (vla-get-tagstring att)))
                (progn (vla-put-textstring att val) val)
            )
        )
        (vlax-invoke blk 'getattributes)
    )
)
(defun LM:vl-setattributevalues ( blk lst / itm )
  Set Attribute Values   -    
  lst - [ lst ] Association list of ( ( < tag > . < value > ) ... )

    (foreach att (vlax-invoke blk 'getattributes)
        (if (setq itm (assoc (vla-get-tagstring att) lst))
            (vla-put-textstring att (cdr itm))
        )
    )
)
(defun LM:vl-getattributes ( blk )
  Get Attributes   -    
  Returns : [ lst ] Association list of ( ( < Tag > . < Value > ) ... )

    (mapcar '(lambda ( att ) (cons (vla-get-tagstring att) (vla-get-textstring att)))
        (vlax-invoke blk 'getattributes)
    )
)
