Home Forums General XMetaL Discussion Structure view: how to set the initial collapse level? Reply To: Structure view: how to set the initial collapse level?

Derek Read

Reply to: Structure view: how to set the initial collapse level?

I'm not sure I understand. Have you tried changing the value for the variable I named “level”?

If you have made that change and it doesn't do what you expect perhaps you need a more robust method for walking your documents and deciding which elements to collapse in the Structure View. The script as written was only minimally tested on one document type.

The main logic of this script is:

1. Save the user's original selection.
2. Turn off document formatting. We are moving the selection around so that would be annoying for the user to see.
3. Loop the next two parts until some condition is met:
    a. move the Selection to some location in the document
    b. call the API Selection.SVCollapsedContainer = true;
5. Turn document formatting back on.

Reply

Products
Downloads
Support