• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

typefi element inside a table

Community Beginner ,
Apr 29, 2016 Apr 29, 2016

Copy link to clipboard

Copied

How to get the typefi element lying in a table?

TOPICS
Scripting

Views

365

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 29, 2016 Apr 29, 2016

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 29, 2016 Apr 29, 2016

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 29, 2016 Apr 29, 2016

Copy link to clipboard

Copied

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.pageItems[0].typefiSettings.element.name== "equ"){

      found.leading = Leading.AUTO;

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

    }

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

   

    var mu= found.parent.parentRow;

    alert();

//~   // Paragraph:

//~   found.paragraphs[0];

//~   // Page:

//~   found.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..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 29, 2016 Apr 29, 2016

Copy link to clipboard

Copied

[ Moved to InDesign Scripting ]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 29, 2016 Apr 29, 2016

Copy link to clipboard

Copied

khkremer wrote:

[ Moved to InDesign Scripting ]

Thank you.

Hello harishbisht,

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

Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Apr 30, 2016 Apr 30, 2016

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines