-
1. Re: Change row height limits
Klaus Göbel Nov 17, 2015 11:38 PM (in response to che47audio)Hi Chris,
this should work, but without quotation marks: row.RowMaxHeight=371542
-
2. Re: Change row height limits
che47audio Nov 18, 2015 12:39 AM (in response to Klaus Göbel)Hi Klaus,
Unfortunately not, I've tried with and without quotation marks and still nothing.
Thanks
Chris
-
3. Re: Change row height limits
Klaus Göbel Nov 18, 2015 12:49 AM (in response to che47audio)Hi Chris,
I've just tested this and it works:
I have created a table, selected it and started this little script:
var gDoc = app.ActiveDoc ; var oTabSelected = gDoc.SelectedTbl; var myRow = oTabSelected.FirstRowInTbl; myRow.RowMaxHeight=371542;
-
4. Re: Change row height limits
che47audio Nov 18, 2015 1:16 AM (in response to Klaus Göbel)I just copied and pasted this out and tried it over one of the tables in my document and it does'nt do anything. I get "Result: 371542" in the console and thats all. Could it be something to do with the formatting of the table?
-
5. Re: Change row height limits
Klaus Göbel Nov 18, 2015 1:24 AM (in response to che47audio)Just try it first with an empty new table to make sure it works in general.
-
6. Re: Change row height limits
che47audio Nov 18, 2015 2:26 AM (in response to Klaus Göbel)It works perfectly with new doc and new table. It must be something further back in the script that’s messing it up.
But if it was something further back then the delete command wouldn’t work in the first instance, but it does!
Would it help to see more of the script?
Thanks
Chris
-
7. Re: Change row height limits
Klaus Göbel Nov 18, 2015 2:48 AM (in response to che47audio)Hi Chris ,
I've just extended the script. Just compare it with your script.
var gDoc = app.ActiveDoc ; var oTabSelected = gDoc.SelectedTbl; var AllRows = []; var myRow = oTabSelected.FirstRowInTbl; while (myRow.ObjectValid()) { AllRows.push(myRow); myRow = myRow.NextRowInTbl; } MinimizeRows(AllRows); function MinimizeRows(fRows) { for (var i = 0; i < fRows.length; i++) { fRows[i].RowMaxHeight=371542; } }
I guess, it has something to do with your document.
Is there a chance, that you send parts of your document to me via PN so I can test that?
-
8. Re: Change row height limits
Klaus Göbel Nov 18, 2015 6:46 AM (in response to Klaus Göbel)Thanks for sending me the doc.
I found the problem:
RowMinHeight was higher than RowMaxHeight :760213
So you just have to add in my example above:
fRows[i].RowMinHeight=371542;
fRows[i].RowMaxHeight=371542;
-
9. Re: Change row height limits
che47audio Nov 18, 2015 8:05 AM (in response to Klaus Göbel)That's done it!
Thanks a lot
Chris