// This macro measures the current selection, outlines it in // the current foreground color, prompts the user for a label, // and draws the measurement number and label. // Also adds the label to last row in the the "Results" // table if "Display Label" is checked in Analyze> // Set Measurements. macro "Measure And Label" { title = getTitle(); label = getString("Label:", "A"); run("Rename...", "title='"+label+"'"); run("Measure"); run("Rename...", "title='"+title+"'"); setJustification("center"); fontSize = 9; //setFont("SansSerif", fontSize); // requires 1.33j run("Draw"); getBoundingRect(x, y, width, height); label2 = "" + nResults+"-"+label; drawString(label2, x+width/2, y+height/2+fontSize/2); }