@Tim Edwards I want to use magic to flatten a .mag file without access to a X-Server. At the moment I am using the commands "select top\nexpand\nflatten $flat\nload $flat\nsave\n" but I get the error "Crosshair not in a valid window for this command". Any ideas?