HydraCAD's templates have layers built into them, as you are already aware. These templates specify properties of the layers such as color, linetypes, plot status, and line-weights, among other things.
Many users are content with using the layer properties we have set as defaults, but what if they want to change them? What if they change their templates, but the HydraCAD settings keep coming back after Super Purge or Rebuild HydraCAD Layers are used?
I want to start this conversation by explaining that there are two things that control the layer settings in a HydraCAD drawing - the template used and the Layer Script (LAYER.SCR) file.
The Template
The template is already understood by most as the drawing which initially sets the layer properties when a new drawing is created. Most users use the Layer Manager to set and change the properties they want, and to add new layers as needed.
The Layer Script
What is this? A script file is a type of AutoCAD file that runs a series of AutoCAD commands, such as those used by the -LAYER command. If you type in -Layer at the AutoCAD prompt (as opposed to Layer, which brings up the Layer Manager), you will see the options available when defining layers. These options can be automatically filled by a script file, which is that the LAYER.SCR file does. This file is run whenever you use the Super Purge (PUR) command or the Rebuild HydraCAD Layers (RBL) command from the HydraTools->Tools menu, seen below:
Note: The script is run by the Super Purge command because the AutoCAD Purge command (which is part of Super Purge) purges out all unused HydraCAD layers, and we need them there.
The commands I will now explain are all found on the HydraTools->Options menu item, seen below:
Editing the Layer Script
We rather you didn't. Really. There is a problem inherent in editing this type of file and things can get messed up in a hurry. There is a better way, which I will get to in a moment. But first, to get this out of the way...
The Layer Script, as mentioned earlier, is a series of commands which are echoed to the command line just as you would type them in, only far faster. Picking HydraTools->Options->Edit HydraCAD Layer Script... will open Notepad with the LAYER.SCR file loaded.
Look at all that gobbledygook! Each phrase is a command, and each blank space is an <Enter>. And that is where things can go wrong. If the wrong letter is used, or an extra blank added, none of the layers may get created, or created using the wrong properties. If you are game, you can try to edit this file but there is a better way.
Automatically Generating the Layer Script
The Layer Script file can be automatically be created from your own template or any drawing you choose. Simply open up the drawing and pick Create Layer Script from this Drawing. The layer script will be auto built using the colors, linetypes, plot or no plot status, line-width and names of new layers that you have created in that template or drawing! That's it, all done.
What if Something goes Wrong?
We thought of that. Since the Layer Script is so sensitive to changes, we included a command to put it back to the way it was installed, and that is the Restore Original HydraCAD Layers command. You can now try your changes again, with that safety net underneath you.
Comments