Why not using the ActiveX approach of block insertion instead of the "INSERT" command ?
this will help you if there's another object created after the block insertion, which will make "entlast" not a best choice to track and fetch data from the inserted block.
what you can do is simply as the following
(vl-load-com) ;Load ActiveX Support
(setq modelspace (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))) ;get the model space object
;| Assume that the insertion point is declared before in a variable called
"inspoint" |;
;| Make sure that there's a previously defined ((block definition)) called "blockname" |;
(setq BlockRefobj (vla-insertblock modelspace inspoint "blockname" 1 1 1 0)) ;insert the block reference in the model space & get its vla-object name.
;The three 1s are the Xscale, Yscale & Zscale, and the last 0 is the rotation angle.
or you can harry up and get its entity name with "entlast" before doing anything else.
__________
if you want to get its properties/parameters, it's also very easy as the following
;get a list of all parameters/properties of the dynamic block [Every property is recognized as a vla-object]
(setq allprops (vlax-safearray->list (vlax-variant-value (vla-getdynamicblockproperties BlockRefObj))))
To get the property name and value from its correspondent vla-object, simply use the functions vla-get-propertyname and vla-get-value using the following
;| Assume that the vla-object of the property is stored in a variable
called "prop" |;
;| Note that "prop" is a member of "allprops" |;
;To get the property name
(setq name (vla-get-propertyname prop))
;To get the property value
(setq val (vlax-variant-value (vla-get-value prop)))
__________
To recap, this makes the function "get-properties" defined as the following
;*Insert the block*
(vl-load-com) ;Load ActiveX support
(setq modelspace (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))) ;get the model space object
(setq inspoint (vlax-3d-point 0 0 0)) ;the zeroes can be replaced with the actual coordinates
(setq BlockRefObj (vla-insertblock modelspace inspoint "blockname" 1 1 1 0)) ;|insert the block reference in the model space
& get its vla-object name. |;
;*Define the function "get-properties"*
(defun get-properties (propname BRefObj / modelspace inspoint BlockRefobj allprops prop)
(setq allprops (vlax-safearray->list (vlax-variant-value (vla-getdynamicblockproperties BRefObj))))
(foreach elem allprops
(progn
(setq name (vla-get-propertyname elem))
(if (eq name propname)
(setq val (vlax-variant-value (vla-get-value elem)))
);if
);progn [of foreach]
);foreach
(progn val) ;what the function returns
);end defun [get-properties]
;*Execute the function "get-properties"*
(setq dist1 (get-properties "Distance1" BlockRefObj))
(setq ang1 (get-properties "Angle1" BlockRefObj))