6 Replies Latest reply on Apr 30, 2016 11:26 AM by Vamitul

    typefi element inside a table

    harishbisht789

      How to get the typefi element lying in a table?

        • 1. Re: typefi element inside a table
          harishbisht789 Level 1

          it is an anchored typefi element and i want to select the row of the table

          • 2. Re: typefi element inside a table
            Laubender Adobe Community Professional & MVP

            I'd suggest you are doing a screen capture of the situation with hidden text showing, edges showing and post it as an inline image here.

            Use the forum's controls for this:

             

            InsertInlineImage-ScreenCapture-AdobeForums.png

             

            Uwe

            • 3. Re: typefi element inside a table
              harishbisht789 Level 1

              Uwe,

               

              This is my code:--

              (function(){

               

                // To test the script interactively, uncomment the following line

                // and select one of the story's text frames.

                //TYPEFI = {inddSpillFrame: app.selection[0]};

              var mSel = app.selection[0], 

              mCheck = mSel instanceof Table || mSel instanceof Document; 

              while (!mCheck) { 

                        mSel = mSel.parent; 

                        mCheck = mSel instanceof Table || mSel instanceof Document; 

                        } 

                var i;

                var found;

                var typefitextFLines;

                var objFrame;

                app.findGrepPreferences = null;

              app.findGrepPreferences.findWhat = '~a';

              found = app.documents[0].findGrep();

              //~   app.findGrepPreferences = null;

              //~   app.findGrepPreferences.findWhat = '~a';

              //~   found = TYPEFI.inddSpillFrame.parentStory.findGrep();

                for (i = found.length-1; i >= 0; i--){

                  if (found[i].pageItems[0].typefiSettings.element.name== "equ"){

                    found[i].leading = Leading.AUTO;

                    found[i].textFrames[0].textWrapPreferences.textWrapMode = TextWrapModes.JUMP_OBJECT_TEXT_WRAP;

                  }

              else  if (found[i].pageItems[0].typefiSettings.element.name== "T_equ"){

                 

                  var mu= found[i].parent.parentRow;

                  alert();

              //~   // Paragraph:

              //~   found[i].paragraphs[0];

              //~   // Page:

              //~   found[i].parentTextFrames[0].parentPage;

                  }

                }

              }());

               

               

               

               

              it is an anchored typefi element.This script is working fine on all other typefi elements which are not lying inside a table.

              But this doen't work on the typefi element lying on the table..

              I want to select that row on which that typefi element is lying, and then i want to increase that row height..

              • 4. Re: typefi element inside a table
                Karl Heinz Kremer Adobe Community Professional

                [ Moved to InDesign Scripting ]

                • 5. Re: typefi element inside a table
                  Laubender Adobe Community Professional & MVP

                  khkremer wrote:

                   

                  [ Moved to InDesign Scripting ]

                  Thank you.

                   

                  Hello harishbisht,

                  I would contact the developers at Typefi and ask for a solution there.

                   

                  Uwe

                  • 6. Re: typefi element inside a table
                    Vamitul Level 4

                    Hi Harishbisht,

                    Assuming inddObject is a typefi float:

                     

                    inddObject.typefiSettings.element.anchor would return a TypefiElementAnchor.

                    then

                    myAnchor.pageItem would return a GraphicLine that is the anchor's in-page representation, so the parent of that Graphic line is a character.

                     

                    In one very long line:

                    var parent=inddObject.typefiSettings.element.anchor.pageItem.parent.parent;

                    if (parent.constructor.name=='Cell'){

                    alert('Anchor in cell')

                    }

                     

                    Like Uwe said, these kinds of questions are better suited for the Typefi Support Portal.