Script for sorting drawings