I have completed the codes for you but you need to modify it to suit your needs since that I don't know what you are trying to do with the return value from the LENGTH attribute besides that the alert message which is not logic in this case I believe.
So just ask if you stuck.
NOTE: I could not open your drawing since it's saved in later release than mine CAD 2017.
Code:
(defun c:penrodcount (/ blks num blk effname unsup)
(if (setq blks (ssget (list (cons 0 "insert") (cons 2 "`*U*,Pencil Rod") (cons 8 "TIE - Pencil Rod"))))
(progn
(repeat (setq num (sslength blks))
(setq blk (vlax-ename->vla-object (ssname blks (setq num (1- num)))))
(setq effname (vla-get-EffectiveName blk))
(cond ((= effname "Pencil Rod") (Get:param:value blk)) ;; you need to assign the value to a variable to use it elsewhere you like in the codes.
(t (setq unsup effname))
)
)
)
)
(if unsup (alert (strcat "Unsupported block " unsup " found in count process")))
(princ)
)
(vl-load-com)
(defun Get:param:value (blk / val)
;; blk = Block reference vla-object. ;;
(vl-some '(lambda (x)
(and (= (strcase (vla-get-propertyname x)) "LENGTH")
(setq val (vlax-get x 'Value))
)
)
(vlax-invoke blk 'getdynamicBlockproperties)
)
val
)