Try this (I haven't enough time to test this code at any situations):;|=============================================================================
* Function insert selected block at the insertion point of text primitives.
* The block have to be inserted at file. Function works only in model space,
* world coordinate system. The block inserted at insertion point of text at the
* same layer. Linetype, lineweight, linescale are copies from text ename.
* Written by kpblc (kpblc2000@gmail.com)
=============================================================================|;
(defun c:mins2txt (/ adoc selset item vla_block
block_ent x_scale y_scale z_scale rotation
)
(vl-load-com)
(setq adoc (vla-get-activedocument (vlax-get-acad-object)))
(vla-startundomark adoc)
(if (and (setq block_ent (entsel "\nSelect the block : "))
(= (cdr (assoc 0 (entget (car block_ent)))) "INSERT")
(setq selset (ssget "_:L" '((0 . "TEXT"))))
) ;_ end of and
(progn
(if (not (setq x_scale (getreal "\nEnter x scale factor <1> : ")))
(setq x_scale 1.0)
) ;_ end of if
(if (not (setq y_scale (getreal "\nEnter y scale factor <1> : ")))
(setq y_scale 1.0)
) ;_ end of if
(if (not (setq z_scale (getreal "\nEnter z scale factor <1> : ")))
(setq z_scale 1.0)
) ;_ end of if
(if (not (setq rotation (getreal "\nEnter rotation, degrees <0.0> : ")))
(setq rotation 0.0)
) ;_ end of if
(while (and selset
(> (sslength selset) 0)
) ;_ end of and
(setq item (ssname selset 0))
(ssdel item selset)
(setq item (vlax-ename->vla-object item))
(setq
vla_block (vla-insertblock
(vla-get-modelspace adoc)
(vlax-3d-point
(vlax-variant-value
(vlax-safearray->list (vla-get-insertionpoint item))
) ;_ end of vlax-variant-value
) ;_ end of vlax-3d-point
(vla-get-name (vlax-ename->vla-object (car block_ent)))
x_scale
y_scale
z_scale
(/ (* 180.0 rotation) pi)
) ;_ end of vla-InsertBlock
) ;_ end of setq
(foreach sub_item '("layer" "lineweight" "linetype")
(vlax-put-property
vla_block
sub_item
(vlax-get-property item sub_item)
) ;_ end of vlax-put-property
) ;_ end of foreach
) ;_ end of while
) ;_ end of progn
) ;_ end of if
(vla-endundomark adoc)
) ;_ end of defun