Hello to you people i say

I'm trying to learn DIESEL ( Autocad 2017 LT ), and I manage to make a couple scripts. I've put them under new made buttons in tool palettes. All of them need to be clicked in order from 1 to 4. General idea is to make a layouts and viewports automatically from user defined names - integer numbers.
One more explanation: i have prepared a rectangles (297x210 [mm]) in Model tab that acts as border for a drawing in scale 1:1 (don't mind the printable area). Rectangles are set side by side from point 0,0 (left bottom corner) and to the right so the next one begins at point 297,0. Each drawing will be set in different rectangle. For now let's don't mind other scales. I've also have prepared page setup ( A4 horizontal ).

So, what does i do:
Button 1) - Gathering information

USERI1 - name of the first layer - number
USERI2 - name of the last layer - number
user specifies beginning and end number as for names of layouts, for example from 4 to 9.
USERI3 - USERI1 is copied to USERI3. USERI3 will be changed and USERI1 is a base value like USERI2.
USERI4 - stores value of osmode. I've noticed that script may snap to something (depending on zoom of a layout) when executing -PAN, messing it up.

Button 2) - Making layouts
it is a loop from USERI1 (USERI3) to USSERI4, it sets name of layout and switch to it. Now i think switching is not nesessery.

Button 3) - Making viewports
it is generating a viewport, selecting it and getting into, selecting a zoom for a rectangle (the first one), making a 1:1 scale, then it pan to the right, for a length of actual number (name) of a layer multiplied by 297 (length of rectangle).

Button 4) - Reseting variables
most important here is setting osmode to its initial state. Its sets all other used USERI virables to 0.

-----------------------------------------------------------------------------

1)
^C^CUSERI1;\USERI2;\setvar;USERI3;$M=$(getvar,USERI1);setvar;USERI4;$M=$(getvar,osmode);_-layer;_Set;"01-Viewport_1";;osmode;0;

2)
*^C^C$M=$(if,$(>,$(getvar,USERI3),$(getvar,USERI2)),USERI3;$M=$(getvar,USERI1);-LAYOUT;S;$M=$(getvar,USERI1);^C;,-LAYOUT;N;$(getvar,USERI3);-LAYOUT;S;$(getvar,USERI3);USERI3;"""$M=$(+,$(getvar,USERI3),1)""")

3)
*^C^C$M=$(if,$(>,$(getvar,USERI3),$(getvar,USERI2)),^C;,-LAYOUT;S;$M=$(getvar,USERI3);_-VPORTS;F;_.MSPACE;_zoom;_w;"0,0";"297,210";_zoom;s;1xp;_.MSPACE;-PAN;"0,0";$M=$(*,$(-,$(getvar,USERI3),1),-297)",0";_.PSPACE;USERI3;"""$M=$(+,$(getvar,USERI3),1)""")

4)
_osmode;$M=$(getvar,USERI4);CUSERI1;0;USERI2;0;USERI3;0;USERI4;0;

-----------------------------------------------------------------------------

So there is my codes, and now... the question:

How to make it to execute like famous "Text on Arc" by Robert Freeman?

I don't get it.

I've been on
Dietmar Rudolph's site
John Walker's site
Mark Gonzales said some ting here about mnu file and cursor menu. How to do that in LT 2017 with CUI files inside CUIx file?

Well, how to run simpler examples from Rudolph's site? Have i missed something?
I've hit a wall here and can't get thru.
Please help or give a hint.

I have also other "question marks in my head" about DIESEL but for now, i'm trying to figure out this.

Thank you in advance for replay i'm counting on ;P
Have a nice day !
Beautiful weather is outside and it's Friday