i have made acode which selects some objects then run a command on them one by one but when i undo autocad undoe those commands one by one, i have tried undo-begin and undo-end but still same result, is there another way or i'm using it wrong, but in general autocad too issuing : undo-begin, ....commands..., undo-end , still typing u undoe those commands one by one. martin