Vol. XVI, No. 2
CSA Newsletter Logo
Fall, 2003

CSA Layer-Naming Convention without AutoCAD

Harrison Eiteljorg, II


Much ink -- perhaps one should now say many web pages? -- has been used in the CSA Newsletter to discuss using the names of layers in CAD models to assist with organizing and analyzing those models. These underlying assumptions have been important to those discussions:

1. Complex models require a systematic way of naming layers for the sake of the work processes.

2. Effective analysis requires access to layers according to their attributes. Restored material, for instance, must not only be separate from in situ material; it must be labeled in such a way that one may call up for display one or the other (or both when needed).

3. Finding layers by multiple attributes must be possible.

4. A hierarchical layer system will not function appropriately for scholarly access to layers, since the attributes are not hierarchical in nature.

5. A layer-naming system must be coupled with a access system to make this approach function.

6. The layer-naming system proposed by CSA, coupled with the layer-access system provided by AutoCAD, provides a good solution for scholars. A virtually unlimited number of attributes can be specified by the layer names, and the layers may be grouped via AutoCAD commands so that all layers with specified attributes may be found easily and efficiently. I have argued that a system similar to the one used by AutoCAD is critical to the effective use of layer names, because I have been able to find no viable alternative. (The important aspect of AutoCAD's layer-access system, which is not unique to AutoCAD but is rare, is its ability to group layers by name and to search for layer names with the use of "wild-card" letters in searches for layer names. See "The CSA Layer-Naming Convention" -- http://csanet.org/inftech/csalnc.html -- for more detail. These assumptions, the layer-naming system built with them, and the AutoCAD layer-access system have been described in considerable detail in that document and in a variety of Newsletter articles listed in "The CSA Layer-Naming Convention.")

Although many CAD programs provide no mechanism for creating ad hoc groups of layers based on characteristics of the layer names, it may be possible to use the same conceptual system with those CAD programs. This alternate approach will work properly with CAD programs that support some form of scripting that will permit the user to input layer names as text, and it requires the use of an external database. In short, this approach uses the database to store information about individual layer attributes, to sort layers according to their content, and to create lists of layers to be entered into a CAD program via a script.

A simple example should make the concept clear. The example model uses layer names to indicate only the following:

1. remains still in situ (I) vs. material physically restored to original position (P) vs. restored in the computer only (C)

2. material (wood (W), stone (S), metal (M), etc.)

3. sub-material (wood variety, e.g., (O) for Oak; stone type, e.g., (M) for marble; etc.)

4. chronological indicator (phase or date -- by numeric entry)

5. draftsperson (by first letter of last name)

It would be easy to create a date table for the layers such as this:

Layer Name"in-situ-ness"materialsub-materialchronological
indicator
drafts-person
1IWO1Sin situwoodoakphase 1Smith
2PSM2Bphysically restoredstonemarblephase 2Brown
3CSL3Jcomputer-restoredstonelimestonephase 3Jones
4IWO1Sin situwoodoakphase 1Smith
5ISM2Bin situstonemarblephase 2Brown
6PSL3Jphysically restoredstonelimestonephase 3Jones
7IWP1Sin situwoodpinephase 1Smith
8ISM2Jin situstonemarblephase 2Jones
9CSL2Jcomputer-restoredstonelimestonephase 2Jones
10IWO2Sin situwoodoakphase 2Smith
11CSM2Bcomputer-restoredstonemarblephase 2Brown
12CSM3Jcomputer-restoredstonemarblephase 3Jones

Such a table could be searched for layers with any single attribute or group of attributes. For instance, all layers with stone would include layers numbered 2, 3, 5, 6, 8, 9, 11, and 12. All marble layers would reduce the group to layers 2, 5, 8, 11, and 12. Layers with in situ marble objects would include only numbers 5, and 8. These kinds of searches are trivial for a database program, and it is simple to export the resulting layer names as a text string. That text string can then be put into a CAD program via a script to select layers to be shown or suppressed.

In AutoCAD, the scripts are very simple (though unnecessary in this instance), just text equivalents to the actual on-screen command sequence. Thus, a script to display only the layers with in situ marble objects could be constructed as follows for AutoCAD: layer thaw z set z freeze * thaw ISM2B,ISM2J. (As AutoCAD users will recognize, that script could be shortened, but it is more clear as shown here.) That command sequence may be explained as follows:

1. "layer" -- Invoke the layer command.

2. "thaw z" -- Add the layer "Z" to the current set. (Z is the layer I use as an empty layer that may always be included in any selection set and made the current active layer for just such scripts as this one. Having the empty Z layer permits me to start a sequence like this without knowing -- or caring -- what layers are to be used in the final analysis.)

3. "set z" -- Make "Z" the active layer.

4. "freeze *" -- Remove all layers from the current set. (AutoCAD will automatically exempt the current active layer from that command.)

5. "thaw ISM2B,ISM2J" -- Add "ISM2B" and "ISM2J" to the current set -- these names could have come from a database as the output from a query for all in situ layers containing marble objects.

A similar command sequence can be constructed for any CAD program that permits scripts to act on layers. Therefore, programs that do not include AutoCAD's layer-search routines -- and even programs that do not permit long layer names -- can deal with complex layer systems such as the one suggested in the CSA layer naming convention. Furthermore, a CAD model with such a layering system and an associated data table can be shared and used more widely. Such a model, created with and taking advantage of AutoCAD's layer-handling features, would still be as useful in another CAD program, though the need to use an external database manager for layers would make it somewhat more difficult to use. This implicitly argues for the creation of an external data table for layers even for AutoCAD models. Having the external data table will make sharing of models more efficient for those without access to AutoCAD.

-- Harrison Eiteljorg, II

To send comments or questions to the author, please see our email contacts page.


For other Newsletter articles concerning the applications of CAD modeling in archaeology and architectural history or the "CSA CAD Layer Naming Convention," consult the Subject index.

Next Article: Lantern Slides Web Pages Moving to Bryn Mawr College Server

Table of Contents for the Fall, 2003 issue of the CSA Newsletter (Vol. XVI, no. 2)

Master Index Table of Contents for all CSA Newsletter issues on the Web

CSA Home Page