Here is a simple but effective way to create a commandscript
using the line command.
This simple macro will draw a line 5 units long when you right mouse click the line icon...
1. Hold the Shift key down and right mouse click over the Line icon to edit the icons' contents.
2. In the right button command box enter the text exactly
as shown in Figure 2, Click OK. You can copy and paste the text
3. Click on the Top viewport title to make it active. Commandscripts are viewport sensitive. This means that Commandscripts might work differently depending on which viewport is active before processing the commandscript.
4. Right mouse click on the line icon in the Lines toolbox. Figure 4
5. Select all and delete the contents leaving the drawing free of objects for Example 2.