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:
Screenshot with Page 2 active:
Screenshot with Page 1 active:
Screenshot with "Master Page" chosen:
More to come...
Save
hywelharris said:One other option I'd like to see is the ability to set the 'Active' layer on each page.
I think that is something I could probably bake into SLS fairly easily. It wouldn't meet your "across pages" needs now, but I think it would be a useful addition to SLS, and it would help to set the stage for using some of the same code in an "across pages" solution in the future.
Thank you for the suggestion!
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:
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:
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":
Because SLS works using the names of the layers, there are some limitations:
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 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.
hywelharris said:One of the things I often need to do is set layer options across pages. So, if I have a non-printing layer where I store reference data I need to be able to set printing OFF for all pages.
I took a swing at that - for just one layer name at a time - with a macro to apply settings for a selected page layer name across all pages. See this thread.
Have you tried that?