Script or lisp to control layers properties in certain viewports

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am looking for a way to automate a repetitive task. I need a lisp (or script) that changes the color of a certain group of layers in certain viewports.
In our office, we create individual files for different parts of a building’s drawings, such as floor plans and slab edge plans, once the common pieces of the drawing are put together, then we recolor the xrefered layers to be able to distinguish them more easily (some people escape this step). Then we xclip some areas and draw live to complete the drawing. All of these happen in the model space.
See file reference structure at the image below as an example.Image 1
Once the xrefing, xcliping and drawing is completed, it’s time to put these drawings in plot sheets using the xrefing command. In plotsheets, we create viewports to display the desired part of the part. Since the xrefed file is consisted of many layers carrying from the different pieces of that file, sometimes it’s confusing to track a layer to its roots.
Please see the example plotsheet below
We only show new information – live drawing portion - in their original color and recolor the repeated –xrefed- parts to a certain color that prints gray. To do so, we have to override the layer color on that specific viewport to get the desired outcome. This process repeats at many sheets and is tedious to manage all those layers compiling from different drawings, popping up in the plot sheet files. -Some projects have more than a hundred sheets!
Now, i am searching for ways to manage layers in viewports smarter!
I know with script files we can control live layers in the modeling space, but I wanted to ask if anyone knows a way that help us to facilitate the whole process – especially plotsheet graphic control- and to automate a good amount of the task.
Best,