Eskimo's macro - Saved Layer Settings

I've written a macro that I call "Saved Layer Settings". I will refer to it here as "SLS". My plan is to describe it in a series of posts in this thread.

What does SLS do?

SLS reads and displays information about layers:

  • SLS shows a list of all page layers for the active page.

    • For each of those page layers, SLS shows the settings (visibility, printability, editability) for that layer.

  • SLS shows a list of all master layers that are applicable to the active page. This includes all "all pages" layers, and also "odd pages" or "even pages" layers as appropriate depending on the odd/even status of the active page.

    • For each of those master layers, SLS shows the general document-wide settings (visibility, printability, editability) for that layer.

    • For each of those master layers, SLS also shows any page-based overrides (for visibility, printability, editability) that are in effect for that layer for the active page.

  • Layer settings are shown as follows:

    • For visibility, "V" indicates visible; a dot in that column indicates not visible.

    • For printability, "P" indicates printable; a dot in that column indicates not printable.

    • For editability, "E" indicates editable; a dot in that column indicates not editable

  • From within SLS, one can change which page in the document is active. After such a change, the form is updated to reflect the new active page.

    • Instead of a regular page, one can choose "Master Page". When that is chosen, the form shows all master layers in the document, including both "odd pages" and "even pages" layers.


Screenshot with Page 2 active:

  • The "E" markers in the Odd/Even column show that ML 5 and ML 6 are "even pages" layers.


Screenshot with Page 1 active:

  • The "O" markers in the Odd/Even column show that ML 3 and ML 4 are "odd pages" layers.

  • General document-wide settings for ML 1 are visible, printable, and editable, but there are page overrides in effect on this page to make that layer not visible, not printable, and not editable.

  • General document-wide settings have the Document Grid set to not visible, but a page override is in effect on this page to make it visible.


Screenshot with "Master Page" chosen:

More to come...

Save

Save

Save

Save

Save

Save

Save

Parents
  • Here's a second installment on this.

    What else does SLS do?

    SLS allows information about layers to be saved:

    Within the form, page layers and/or master layers can be selected.


    Screenshot with some layers selected:

    • For page layers, Layer 2, Layer 3, and Layer 4 have been selected.

    • For master layers, ML 2 and ML 3 have been selected.

    After clicking the button "Save New SLS Set for Selected Layers", the user is prompted to specify a name for the SLS set. The information for the selected layers is then stored. If a regular page is being viewed, then the information is stored as a Properties object for that page. If the form is showing "Master Page", then the information is stored as a Properties object for the document. So, this is all contained within the .CDR file. For this example, the SLS set saved right after the previous screenshot was named, "My First SLS Set".

    SLS allows saved layer settings to be viewed and applied:

    Within the form, names of SLS sets available for the active page (or Master Page) are shown.


    Screenshot without an SLS set selected:

    • As before, what is seen in the form now is the current status of layers. One can see that settings have been changed for a number of layers since the previous screenshot.

    • The list of SLS sets is no longer empty. It now has "My First SLS Set" in it.

    When an SLS set is selected, then the lists for page layers and/or master layers are updated to show which layers are present in the SLS set, and what the settings in that SLS set are for those layers.


    Screenshot with an SLS set selected:


    If "Apply Selected SLS Set" is clicked, then the settings in the selected SLS set are applied.


    Screenshot after applying "My First SLS Set":

    • Changes to layer settings have been applied.

    • The form is, again, showing the current (now changed for some) status of the layers.


    Because SLS works using the names of the layers, there are some limitations:

    • If the document has two or more master layers with the same name, then SLS will refuse to run.

    • If a page has one or more page layers with the same name, then SLS will refuse to work with that page.

    • If a page has one or more page layers that have the same name as a master layer that is applicable to that page, then SLS will refuse to work with that page.

      • The noted exception to this is that there is no conflict between the Guides layer on the page and the Guides layer on the Master Page.

    Save

    Save

    Save

    Save

  • OK, third installment on this.

    The checkbox, "For Master layers, only apply Page overrides; don't change Master settings" is there to control how master layers are handled when an SLS set containing them is applied.

    • If the box is unchecked, then general document-wide settings for master layers in that SLS set are applied. Page-based overrides for those master layers are also applied.

    • If the box is checked, then no changes are made to the general document-wide settings for master layers in that SLS set. Page-based overrides for those layers, however, are applied (if they are relevant, based on the current document-wide status of those master layers).

      In CorelDraw, page-based overrides of master layer settings are not very "durable". If a document-wide setting for a master layer is toggled back and forth, then all page-based overrides associated with that setting - document-wide - are lost. If such page-based overrides in use on a page have been saved using SLS, then it's easy to restore them.

    If one has selected and viewed the details for an SLS set, but wants to return instead to viewing the current status of layers, then the "Deselect SLS Set" button is the way to do that.

    The button "Delete Selected SLS Set" removes the associated Properties object from the page/document.

    Save

Reply Children