Try this. Not sure what you want for attribute values. Can ask once then will be added correctly. Maybe 3 getstring after pick pline.
; https://www.cadtutor.net/forum/topic/98666-block-insert-lisp/
; arrows by AlanH Aug 2025
(defun c:wow ( / plent co-ord isclosed x obj ang)
;; Set Dynamic Block Property Value - Lee Mac
;; Modifies the value of a Dynamic Block property (if present)
;; blk - [vla] VLA Dynamic Block Reference object
;; prp - [str] Dynamic Block property name (case-insensitive)
;; val - [any] New value for property
;; Returns: [any] New value if successful, else nil
(defun LM:setdynpropvalue ( blk prp val )
(setq prp (strcase prp))
(vl-some
'(lambda ( K )
(if (= prp (strcase (vla-get-propertyname k)))
(progn
(vla-put-value K (vlax-make-variant val (vlax-variant-type (vla-get-value K))))
(cond (val) (t))
)
)
)
(vlax-invoke blk 'getdynamicblockproperties)
)
)
(setq plent (entsel "\nPick pline"))
(setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent)))))
(setq isclosed (cdr (assoc 70 (entget (car plent)))))
(setq x 0)
(command "-insert" "Stalb" (nth x co-ord) 1 1 0 "" "" "")
(setq obj (vlax-ename->vla-object (entlast)))
(setq ang (angle (nth x co-ord) (nth (+ x 1) co-ord)))
(LM:setdynpropvalue obj "Angel_1" ang)
(if (= isclosed 1)
(progn
(setq ang (angle (nth 0 co-ord) (last co-ord) ))
(LM:setdynpropvalue obj "Angel_2" ang)
)
)
(repeat (- (length co-ord) 2)
(command "-insert" "Stalb" (nth (setq x (1+ x)) co-ord) 1 1 0 "" "" "")
(setq obj (vlax-ename->vla-object (entlast)))
(setq ang (angle (nth x co-ord) (nth (+ x 1) co-ord)))
(LM:setdynpropvalue obj "Angel_1" ang)
(setq ang (angle (nth x co-ord) (nth (- x 1) co-ord)))
(LM:setdynpropvalue obj "Angel_2" ang)
)
(command "-insert" "Stalb" (nth (setq x (1+ x)) co-ord) 1 1 0 "" "" "")
(setq obj (vlax-ename->vla-object (entlast)))
(setq ang (angle (nth x co-ord) (nth (- x 1) co-ord)))
(LM:setdynpropvalue obj "Angel_2" ang)
(if (= isclosed 1)
(progn
(setq ang (angle (nth x co-ord) (nth 0 co-ord) ))
(LM:setdynpropvalue obj "Angel_1" ang)
)
)
(princ)
)