0 Replies Latest reply on Jan 9, 2013 12:46 AM by hurix@123

    object properties

    hurix@123 Level 1

      Hi forums,

       

      Below is my code

       

      var mydoc = app.activeDocument;

      app.activeDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.MILLIMETERS;

      app.activeDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.MILLIMETERS;

       

      var rootElement = mydoc.xmlElements.item(0);

      var linkElementList = rootElement.evaluateXPathExpression("//div[@class='boxed-text']");

      for(var lp=linkElementList.length-1; lp>=0; lp--){

              var myElement = linkElementList[lp];

                      var myTextframe = myElement.placeIntoInlineFrame(["16p5","5p"]);

      //myTextframe.fillColor = "Black20";

      myTextframe.applyObjectStyle(app.documents[0].objectStyles.item("Box"), true);

       

       

                   myTextframe.move([17, 17]);

                            myTextframe.fit (FitOptions.frameToContent);

       

       

      myTextframe.textWrapPreferences.textWrapMode = TextWrapModes.BOUNDING_BOX_TEXT_WRAP;

                                                      myTextframe.textWrapPreferences.textWrapOffset = [3, 3, 3, 3];

                                                                          myTextframe.anchoredObjectSettings.releaseAnchoredObject();

                                                                         

                                                                     

      /*var tx="";

      if  (myTextframe>="16p5", "120")

          {

             

                          tx = myElement.placeIntoInlineFrame(["407p8","120p"]);

       

       

       

       

          }*/

      }

       

      My Question is if myTextframe Height > 120pt then width shuld be 408pt

       

      Can any one help

       

      Hurix