Autodraw button function