Harrison Eiteljorg, II and Susan C. Jones
The CAD models of the ceiling and roof of the NW wing of the Propylaea are nearly complete. Without the completed walls they rest on, the ceiling and roof models require nearly 100 MB of disk space. There are now multiples files that have been cross-referenced because an individual file would be too large. In fact, the entire roof is now so large that CSA has ordered a new computer with four times the RAM of our current CAD computer (and capacity for double that) in order to deal with the growing size of the model. Opening the roof files on the current machine with 128 MB of RAM (yes, just opening them) took more than 13 minutes; virtually any operation then occurred at glacial speed.1
The need to have multiple files has created another problem. The utility of CAD files is greatly enhanced by the careful and self-conscious use of data segments within files, called layers in most CAD systems. When the layers are named correctly, their content is clear from the layer names, and it is easy to select them for display and analysis or to suppress layers not wanted in a particular view. When properly constructed names are used, the layers can be accessed with database-like exactitude, and this has been such a recurring theme with CSA's use of CAD that there have been articles about the subject from the very first issue of the CSA Newsletter. The CSA Layer Naming Convention (http://csanet.org/inftech/csalnc.html) is one of the most important documents on CSA's web site; it has evolved in tandem with articles in the Newsletter..
With multiple files making up a model -- each file possibly containing many layers -- the problems of selecting the correct layers grow significantly. Having both file and layer names to contend with, a system that can access individual layers from any file is required. (It is also necessary, when creating multi-file models, to pay careful attention to the directory structure used so that secondary users of the files are able to access all the files without difficulty.)
Preparing such a system led to one immediate choice. The basic file in a group of cross-referenced files, the one to which others are linked, should be an empty file. It should serve only as the empty vessel into which all the others are placed as needed. It should contain no layers except the 0 (zero) layer, a layer with a scale, a layer with a north arrow, and a layer named refs for the external files, which are actually attached to a layer, not a drawing; the base file should contain no entities save those required for the scale and north arrow.
Having an empty base file will accomplish four goals. One, it permits any selection of cross-referenced (x-refed in AutoCAD® jargon) files to be gathered, without the complication of material from the base file. Two, it prevents unintended damage to the model, since an external, x-refed file cannot be edited unless it is opened separately. Only the base file can be changed. Three, there can be multiple base files -- each with a different group of external files so that, for instance, one base file might contain all the files for the NW wing while another contained all the roofing files for the entire Propylaea. Otherwise, users must resort to x-refed files that, in turn, contain more x-refed files (nested x-references). Four, it means that any file with actual modeled material can be opened alone, without x-refed files. (If a file with external files linked to it is opened, the other files are also opened automatically.)
When other files are related to the base file -- which will be called Propylaea in this case -- they will always have the same entry point (0,0,0) and no scale factors. They will also be oriented the same. This is very important, since it means that the files can always be brought into the base file without concern for position, scale, or orientation, but it also means that the CAD modelers who create the files must make certain that each file is related to the overall grid system, not simply existing in its own isolated world.
Before continuing this discussion of the file-and-layer-naming system that has been created at CSA, readers who have not previously read and understood the CSA Layer Naming Convention should stop to read it. Understanding that convention and the system underlying it is assumed in the following.
This system is designed for use with AutoCAD; we are not certain how it will work with other CAD programs.
When using the command line to control layers (or using the name filter via the layer dialog box), it is possible to select groups of layers via explicit layer names or via wild-card names that broaden the search criteria. The wild-card characters permit the selection of several layers at once. Users of DOS or UNIX will recognize some of those wild-card characters immediately. The ? and * are the most regularly used; ? indicates any character, and * indicates any number of unspecified characters.
Let us assume that the following are the layers available in a drawing (there is no distinction between upper and lower case letters in the AutoCAD system):
If the command sequence is begun and abc? is used to select the layers intended, the system will select layers abcd and abcc. Both have abc and a fourth character. Had the request been for abc, no layers would have been selected; there is no layer abc, only layers beginning with abc and having a fourth character. Had the request been directed at layers abc*, the result would have been the same as for abc?, since * permits any number of characters (including none). A search for ab?, though, would find no layers; a search for ab* would find abcd, abcc, abdc, and abbb -- layers beginning with ab and containing any number of following characters.
Some years ago AutoCAD added a very desirable wrinkle to this system. They permitted users to apply the * at any point in the specification, not just at the end, as with DOS. Thus, *d would yield abcd, bacd, aaad, and addd -- layers with a d as the last character (i.e., layers with any number of characters followed by a d and nothing else). Searching for *d?, on the other hand, requires any number of characters followed by a d and any other single character: abdc, aadd, and addd.
Knowing that searches are based on both a specific character and the position of that character within the layer name led to the development of the CSA Layer Naming Convention, and all the successive modifications of the system have been built upon that important point. An a in the first position of a layer name is not the same is an a in the second, third, fourth, or . . . position.
When x-refed files are used in AutoCAD, the layer searches are similar, but there are two changes. First, all the layers in an external file can be selected by selecting the layer in the base file to which the external file is attached. Thus, one may suppress all the layers in an external file by suppressing a single layer in the base file. Second, all layers in external drawings can also be selected individually, with the same commands and the same wild-card characters, but the x-refed layer names are treated as the external file name plus a vertical bar (|) plus the actual layer name (no spaces). Thus, the layer names above, if in a file called abc.dwg, would appear as follows in a file into which abc.dwg had been x-refed:
Assuming just one other external file (abd.dwg) in the base file, we might also have these layers:
Searches for layers may take into account the name of the file, either explicitly or via wild cards, as well as the layer names. A search for abc* would find all the layers in file abc.dwg. However, a search for *|abc* (or *|abc? would find specific layers from file abc.dwg just as in the original search: abc|abcd and abc|abcc; that search would also turn up layer abd|abca. In these cases, the vertical bar (|) character has been used to advantage, making sure that the search applies to all layers in external files, but no layers in the base file. A search for abc|abc* would have selected only the layers from the file abc.dwg. (Some readers may have noted an added advantage to using an empty base file in the foregoing. Having an empty base file and beginning all searches with a *| means that all such searches turn up the proper layers, regardless of the files the layers are in.)
It is clear now that using x-refed files need not reduce the effectiveness of the layer-naming convention developed by CSA in the past. In fact, if the same kind of system is used for file names as for layers names, the result will be complete control over the model, as with layer names and a single file.
File names should be constructed just as layer names have been, with characters deriving their meanings from position as well as the character itself. Searches based on file names can therefore be just as predictable and useful as searches based on layer names. Searches using both can pinpoint the material requested exactly.
The length and complexity of the file-naming system must depend on the individual project. It could reflect almost exactly the layer-naming system, but it could also be much shorter and simpler. For the Propylaea, we are now planning to use only a few of the characters used for the layer names. Files will have four characters in their names, as follows:
There is one significant differences between using multiple files with layer names and using a single file with layer names: if a drawing entity is queried with the AutoCAD list command, the information normally includes the layer name. If the layer is from an x-refed file, however, it will include the attachment layer on the current drawing and the name of the x-refed file, but not the layer name in that file. This is somewhat unfortunate, but not catastrophic. Less convenient ways to determine the layer name could be used, and the x-refed file could be opened independently for the same query.
-- Harrison Eiteljorg, II
Susan C. Jones
To send comments or questions to either author, please see our email contacts page.
1. As is clear, this problem with file size means that access to large CAD files for people with typical PCs may be more limited than one would hope. In time, this problem will probably fade, but it is a concern.Return to body of text.
For other Newsletter articles concerning the applications of CAD modeling in archaeology and architectural history, the "CSA CAD Layer Naming Convention," or the Propylaea Project, consult the Subject index.
Next Article: Measuring with Precision and Accuracy
Table of Contents for the Spring, 2002 issue of the CSA Newsletter (Vol. XV, no. 1)
Table of Contents for all CSA Newsletter issues on the Web