I am trying to record a script that would insert things from tools Pop up window as micromeshes into current subtools. So it could replace several scattered squares with a number of meshes from PopUp list based on their naming

It works just fine with standard primitives but doesn't work at all with other meshes/tools in the list. When the script try to insert a micromesh that is not a standard primitive I get an error message.

The goal of all this is to make a replacement to multi mesh insert tool that would insert micromeshes instead which able to keep their original UVs