Thanks very much Stig. This routine will save me hours in a job.
When I was doing my psuedo code I had thought that I would need to rotate the ucs, do the rectangle, rotate ucs back to original. Trouble is that I can sort of think what I want to do, but, have no idea where to start. I guess it will come with experience!
Kind regards
Tracey