Questions about building the tile map

Is there any way to transform items to tile map, without dragging. If yes like what?

You can create and fill a tilemap programatically with TileMapLayer.set_cell and exomat’s code to load (and export) a TileMap should be a good starting point for you.