Highlighted

Applying table row properties via script

Advocate ,
Apr 01, 2019

Copy link to clipboard

Copied

I am setting some row properties and no matter what I have tried - they do not get applied.

I have the table row available in the oRow object. First I tried setting the row start position directly:

oRow.RowStart = Constants.FV_ROW_TOP_OF_COL;

If I call Table > Format > Row Format the dialog shows that the Top of Column setting is set. It is just not activated - the row remains where it is.

I tried to set the property via SetProps as follows:

var oaProps = oRow.GetProps( );
var i = GetPropIndex( oaProps, Constants.FP_RowStart );
var oProp = oaProps;
oProp.propVal.ival = Constants.FV_ROW_TOP_OF_COL;

var oaNewProps = new PropVals;
oaNewProps.push( oProp );
oRow.SetProps( oaNewProps );

Same result - the property is set (as showing in the Row Format dialog) but not activated. Does anyone know how to make this work ?

By the way, I first tried to use EDD rules to force the row to the top of the column via an attribute value - that does not work either.

Adobe Community Professional
Correct answer by frameexpert | Adobe Community Professional

Hi Jang,

There are some things that you do with tables programmatically that don't show up unless you update the document's hyphenation. I had to do this with my TableCleaner script and my earlier TableCleaner plugin. Try something like this:

doc.Rehyphenate ();

where doc is your Doc object.

-Rick

TOPICS
Scripting

Views

1.1K

Likes

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

Applying table row properties via script

Advocate ,
Apr 01, 2019

Copy link to clipboard

Copied

I am setting some row properties and no matter what I have tried - they do not get applied.

I have the table row available in the oRow object. First I tried setting the row start position directly:

oRow.RowStart = Constants.FV_ROW_TOP_OF_COL;

If I call Table > Format > Row Format the dialog shows that the Top of Column setting is set. It is just not activated - the row remains where it is.

I tried to set the property via SetProps as follows:

var oaProps = oRow.GetProps( );
var i = GetPropIndex( oaProps, Constants.FP_RowStart );
var oProp = oaProps;
oProp.propVal.ival = Constants.FV_ROW_TOP_OF_COL;

var oaNewProps = new PropVals;
oaNewProps.push( oProp );
oRow.SetProps( oaNewProps );

Same result - the property is set (as showing in the Row Format dialog) but not activated. Does anyone know how to make this work ?

By the way, I first tried to use EDD rules to force the row to the top of the column via an attribute value - that does not work either.

Adobe Community Professional
Correct answer by frameexpert | Adobe Community Professional

Hi Jang,

There are some things that you do with tables programmatically that don't show up unless you update the document's hyphenation. I had to do this with my TableCleaner script and my earlier TableCleaner plugin. Try something like this:

doc.Rehyphenate ();

where doc is your Doc object.

-Rick

TOPICS
Scripting

Views

1.1K

Likes

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
Apr 01, 2019 0
Adobe Community Professional ,
Apr 01, 2019

Copy link to clipboard

Copied

Hi Jang,

There are some things that you do with tables programmatically that don't show up unless you update the document's hyphenation. I had to do this with my TableCleaner script and my earlier TableCleaner plugin. Try something like this:

doc.Rehyphenate ();

where doc is your Doc object.

-Rick

Likes

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
Reply
Loading...
Apr 01, 2019 0
Advocate ,
Apr 01, 2019

Copy link to clipboard

Copied

Rick, you rock !

I tried Save (which worked for another table change), Reformat, Redisplay. I had not seen Rehyphenate and I never would have thought of that.

Thanks. This will make my customer very happy.

Likes

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
Reply
Loading...
Apr 01, 2019 0