A good rule of thumb is when ever you are saving model elements as an object then model them (or move them) to the drawing origin before saving as an object.
Place the point you want as the object origin on the project origin.
In the first few lines of an object created by saving elements will be MUL and ADD.
The MUL is rescaling everything in the script after it based on the A, B and ZZYZX sizes in your parameters
The ADD will be moving everything in the script after it to absolute 0,0,0 - i.e. negating the offset of the elements from the project origin.
Any ROT, ADD, MUL (transformation commands) that you add needs to be before these other commands.
I have noticed that the automated scripts do not always (never?) put the appropriate DEL commands at the end to negate the initial ADD and MUL commands.
Out of habit I always add these myself.
THE DEL commands required for the ADD command you place at the beginning of the script must come after the last DEL commands.
Keep the automated script intact as if it is in a bubble.
Only add commands before and after this script until you really know what you are doing.
Many lines in the automated scripts can be deleted with no harm but it is best just to ignore them.
The simple version of the DEL command will always undo the most recent transformation command in the script - a bit like closing brackets in a mathematical equation.
That is why it is important to have a matching DEL for every transformation command
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11