I tried to update this lisp as last coment, buy i can´t to do., can you help us, please
; simple single column table
; By Alan H Aug 2019
; Edited to get the length property of a dynamic block
; calderg1000 Dic. 2021
(vl-load-com)
(defun c:List_length_dyn ( / total selectionset count intger selectionsetname obj_name pt1 numrows numcolumns rowheight colwidth ent doc curspace obj objtable blk prp)
(defun LM:Dbl ( / pt1 numrows numcolumns rowheight colwidth ent doc curspace obj objtable blk prp)
(setq prp (strcase prp))
(vl-some '(lambda ( x ) (if (= prp (strcase (vla-get-propertyname x))) (vlax-get x 'value)))
(vlax-invoke blk 'getdynamicblockproperties)
)
)
(if (setq total 0
selectionset
(ssget '((0 . "INSERT")
(-4 . "<or")
(2 . "`*U*")
(2 . "_P1000")
(2 . "HLS 50")
(-4 . "or>")
)
)
)
(progn
(setq count (sslength selectionset))
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq curspace (vla-get-modelspace doc))
(setvar 'ctablestyle "Standard")
(command "_.dimstyle" "_restore" "Standard")
(setq pt1 (vlax-3d-point (getpoint "\nPick point for top left hand of table: ")))
(setq numrows 2)
(setq numcolumns 3)
(setq rowheight 50)
(setq colwidth 300)
(setq objtable (vla-addtable curspace pt1 numrows numcolumns rowheight colwidth))
(vla-settext objtable 0 0 "LENGTH TABLE")
(vla-settext objtable 1 0 "Bloque")
(vla-settext objtable 1 1 "Cantidad")
(vla-settext objtable 1 2 "Length")
(vla-SetTextHeight Objtable (+ acDataRow acHeaderRow acTitleRow) 20)
(setq objtable (vlax-ename->vla-object (entlast)))
(repeat (setq intger (sslength selectionset))
(setq selectionsetname
(ssname selectionset
(setq intger (1- intger))
)
obj (vlax-ename->vla-object selectionsetname)
Ov (vlax-variant-value (vla-getdynamicblockproperties obj))
Os (vlax-safearray->list Ov))
d (vlax-variant-value(vla-get-value (nth 0 Os)))
total (+ total (d)
)
)
(vla-InsertRows objtable numrows 50.0 1)
(vla-SetTextHeight Objtable (+ acDataRow) 15)
(vla-SetAlignment Objtable acDataRow acMiddleCenter)
;(vla-settext objtable numrows 0 selectionsetname)
(vla-settext objtable numrows 1 (rtos count 2 2))
(vla-settext objtable numrows 2 (rtos total 2 2))
(setq numrows (+ numrows 1))
); end if
(princ)
))