Create x++ job in AOT and put a code listed in above link in that job. Change values for item Number and execute (F5) and check if variant is created.
In the AOT, right-click the Jobs node, and then select New Job.
In the Editor window, enter the X++ code shown in the above link, and then save the changes.
In the Editor window, press F7 to compile your job, and then press F5 to run your job.