Replacing view templates names

I have solved it at last. The problem is considered in getting elements(not names) of 3d views templates. In details here: Set View Template for 3D Views - #5 by Mostafa_El_Ayoubi.
I realised it in the following way(attached)