7 Replies Latest reply on Sep 18, 2015 7:53 AM by prafuls54569274

    how to change corner radius in the line.... myPageItem.convertShape(ConvertShapeOptions.CONVERT_TO_ROUNDED_RECTANGLE);

    prafuls54569274

      main();

      function main(){

        if (app.documents.length != 0){

        if (app.selection.length > 0){

        for(myCounter = 0; myCounter<app.selection.length; myCounter++){

        myPageItem = app.selection[myCounter].duplicate();

        myPageItem.convertShape(ConvertShapeOptions.CONVERT_TO_ROUNDED_RECTANGLE);

       

       

        var myFlapLeft = 20;

        var myFlapRight = 20;

        var myFlapTop = 40;

        var myFlapBottom = 40;

        var myTaperV = 4;

        var myTaperH = 2;

       

       

        switch(myPageItem.constructor.name){

        case "Rectangle":

        for(myPathCounter = 0; myPathCounter < myPageItem.paths.length; myPathCounter++){

        myPath = myPageItem.paths.item(0);

        shapeH(myPath, myFlapLeft, myFlapRight, myFlapTop, myFlapBottom, myTaperH, myTaperV);

        }

        break;

        default:

        alert("This script works only for rectangles!!");

        break;

        }

        }

        }

        else{

        alert("Please select an object and try again.");

        }

        }

        else{

        alert("Please open a document, select an object, and try again.");

        }

      }