Download printable version tutorial.pdf: http://sourceforge.net/project/showfiles.php?group_id=151737&package_id=232282
You will need Acrobat Reader to view and print this document.
This document is a tutorial on how to create structures using the graphics tools using XTrackCAD. The methods described here are not a comprehensive list. However as a starting point, these methods should help you to become creative in your use of the graphics tools in XTrackCAD. Whether you want to design very accurate and detailed structures or just approximations of their basic footprint, the main purpose of structures on your XTrackCAD layout is for alignment against track and other structures. By creating the various industrial buildings, rural and urban structures, vehicles, and roadways, you will be assured there is sufficient room for these features and they will be properly aligned to your scale.
The first step in designing a new structure is to choose an object which has a shape with known dimensions. You may already have a built-up model or a kit which contains a drawing with actual dimensions. However, in most cases during the design stage of your layout you may not have decided what kind of structures you will be placing on your layout. The Internet is an excellent way to help you select the type of buildings and structures you want to incorporate on your XTrackCAD design. By browsing let's select a Modular building kit from Walther's as our project for this tutorial. If you use your Internet browser and go to www.walthers.com you can find the following Modular Kit by searching their website. (Author's note: Since the Web changes from time to time, the web site may move or remove pages, so you may not be able to find this page in the same location). This kit is a Modular which can be constructed in various shapes. Let's choose one of the 3 designs in the advertisement. For this tutorial, we will create the "Two-Story Factory with Large Loading Addition" as depicted in the top center of the AD. The footprint is shown below and to the right of the image. The reason we have chosen this structure is that it displays some rooftop detail. For this tutorial, we want to approximate the roof image so this particular building is a suitable choice. We will refer back to this image many times during the lesson, so you may find it necessary to scroll back to this page. Now let's begin.
The first step in creating a new structure is to open up a new workspace. Click on File/New. Now zoom in to the maximum display size and use the map to place the (0, 0) coordinate in the lower left corner. You should now have an enlarged image of the workspace with a scale in inches along the x and y axes. We will use these scales to layout the basic footprint with the proper dimensions of the Two-Story Factory. There are two methods for creating structures. A simple line drawing will suffice if all we want is a basic footprint with only a little detail. The second option is to use the "filled" tools to create shapes filled with colors to display a more realistic image of the structure. For this tutorial, we shall follow the second option.
The Two-Story Factory is an L-shaped building that can be constructed from 2 "filled" rectangles adjacent to each other. Select the down arrow next to the box icon and select the "Create a filled box" from the drop down menu.
The largest dimension of the building is 7-3/4" x 5-1/4". This is the "full" footprint for the factory. The drawing does not give the actual dimensions for the L-shaped section, so we will have to estimate it. This is not a problem since the full footprint is all we need for alignment purposes. Looking at the Two-Story Factory footprint in the Walther's Ad, we can estimate that the L-section is a rough ratio of 1/3 the length by 1/2 the depth. Therefore the rectange in the lower left part is approximately by 5.167" x 2-5/8". You can use a calculator to get the first dimension (7.75 x 2/3 = 5.16666...) or just estimate it. Now draw this rectangle by placing the x-y cursors on the axes scales on the origin (0,0), left click and hold, and then move the mouse while setting the x-y scale indicators on X(horizontal) = 5.167" and Y(vertical) = 2 5/8" (2.625). (Note: Use the x-y dialog windows in the bottom status line and set the x and y values as close as possible. The values may not be exact) Release the left button and a black rectangle will appear.
Click on the select tool and select the rectangle. Then click on the
icon and click on the Color button on the Polygon (T1) pop up dialog window. Pick a color for the Color pop up menu and click OK. For this tutorial chose the color Gray since that is the color of the roof in the Walter's Ad.
Draw the larger rectangle by placing the cursor on the upper left corner of the rectangle, left click and hold, and drag the mouse to position the cursor at 7-3/4" x 5-1/4. Then use the previous method to change the color of the larger rectangle to gray.
Now we need to create the upper walls of the roof. To simulate the thickness of the red brick along the edge of the roof line, create rectangles 1/8" thick and then change their color to reddish brown using the previous methods.
The basic footprint is in place. The remaining part is optional and can contain as much detail you wish to create. You can use the graphics tools just as you would use the tools in XTrackCAD to create track sections and curves. Use of these tools should be straight forward, So use the line drawing tool to create the ribbed roof on the smaller rectangle. Draw a line down the center of the rectangle. Draw ribs 1/8" apart perpendicular to the center ridge line. Exact dimensions are not important as we are approximating the roof detail. Use the Filled Circle tool to add more roof detail by adding some vents. You can change the color of these features if you like. The final drawing is shown below.
To save your structure click on Edit from the main menu and click on Select All. Next click on Manage from the main menu bar and then select Group. Enter the name of the Manufacturer (e.g. Walther's) in the pop up dialog box, enter a description and the part number. Click OK. To write the structure into a Parameter file, click on Manage and select Custom Management. Locate the structure in the Pop up menu and select it. Click on Move To and enter a file name. For this tutorial enter "Tutorial-n" (where "-n" is the scale) for the file name and click Save. A pop up menu may appear. If it does, then enter a name descriptor for the file (this is not the filename). You can repeat these steps to add other objects into the same file if you wish.
In this section we will take a closer look at the format of the Parameter File. But first, let's review what we just did to create the Two-Story Factory. The first step involved laying down 2 filled rectangles to establish a basic footprint. This was done initially so that other filled objects could overlay these rectangles. This is necessary since the parameter file is used by XTrackCAD to draw objects in a "top-down" or first come first served order. Therefore the gray rectangle's edges were over written with the reddish brown roof walls. And likewise, the other roof detail overlaid the underlying objects. The main rule when creating structures is to place the underlying objects first and overlay them with the upper layer objects. This will make the various images visible. Such is the result of the Top-Down structure of the parameter file. The second rule is to use color to contrast objects from one another.
Now let's look at the Tutorial.xtp file (see below). The CONTENTS part is the Title we entered in the dialog box. Next is the code word STRUCTURE followed by the information we entered in the Custom Management dialog. The next line begins with F3. that indicates the Filled Box command and it's color (8421504). Following this are the x-y coordinates the for rectangle. The first two segments are obviously our two Gray rectangles. The next six sections are the reddish brown (8388608) roof walls. The final part of the file contains the lines (L3) for the roof ribs and the circles (G3). Normally you do not need to be concerned with the parameter file. However, there may be a time when you might want to edit the file using a text editor like Wordpad. You may want to move an object to a different order in the file. Remember that XTrackCAD will draw each object in the order it is read from this file (i.e. top to bottom). 'So if you find it necessary to overlay a larger object over other objects, you could edit this file to move that object above the other objects to make them all visible. Only advanced users should try this approach and in any case you should always make a backup before editing this file.
STRUCTURE N "Walther's Two-Story factory 933-3295"
F3 8421504 0.000000 4
0.000000 0.000000 0
5.171875 0.000000 0
5.171875 2.625000 0
0.000000 2.625000 0
F3 8421504 0.000000 4
0.000000 2.625000 0
7.750000 2.625000 0
7.750000 5.265625 0
0.000000 5.265625 0
F3 8388608 0.000000 4
0.000000 0.000000 0
5.156250 0.000000 0
5.156250 0.125000 0
0.000000 0.125000 0
F3 8388608 0.000000 4
5.156250 0.031250 0
5.000000 0.031250 0
5.000000 2.687500 0
5.156250 2.687500 0
F3 8388608 0.000000 4
7.750000 5.250000 0
7.625000 5.250000 0
7.625000 2.640625 0
7.750000 2.640625 0
F3 8388608 0.000000 4
0.000000 5.281250 0
7.750000 5.281250 0
7.750000 5.125000 0
0.000000 5.125000 0
F3 8388608 0.000000 4
0.000000 5.281250 0
0.109375 5.281250 0
0.109375 0.015625 0
0.000000 0.015625 0
F3 8388608 0.000000 4
7.734375 2.640625 0
0.000000 2.640625 0
0.000000 2.750000 0
7.734375 2.750000 0
L3 0 0.000000 0.093750 1.375000 0 5.000000 1.390625 0
L3 0 0.000000 0.250000 2.640625 0 0.250000 0.125000 0
L3 0 0.000000 0.500000 2.656250 0 0.500000 0.125000 0
L3 0 0.000000 0.750000 2.656250 0 0.750000 0.062500 0
L3 0 0.000000 1.000000 2.640625 0 1.000000 0.125000 0
L3 0 0.000000 1.250000 2.656250 0 1.250000 0.125000 0
L3 0 0.000000 1.500000 2.656250 0 1.500000 0.125000 0
L3 0 0.000000 1.750000 2.656250 0 1.750000 0.125000 0
L3 0 0.000000 2.000000 2.656250 0 2.000000 0.125000 0
L3 0 0.000000 2.250000 2.656250 0 2.250000 0.125000 0
L3 0 0.000000 2.500000 2.656250 0 2.500000 0.125000 0
L3 0 0.000000 2.750000 2.656250 0 2.734375 0.140625 0
L3 0 0.000000 3.000000 2.640625 0 3.000000 0.156250 0
L3 0 0.000000 3.250000 2.656250 0 3.250000 0.156250 0
L3 0 0.000000 3.500000 2.656250 0 3.500000 0.125000 0
L3 0 0.000000 3.750000 2.671875 0 3.734375 0.125000 0
L3 0 0.000000 4.000000 2.656250 0 4.000000 0.140625 0
L3 0 0.000000 4.250000 2.656250 0 4.250000 0.125000 0
L3 0 0.000000 4.500000 2.656250 0 4.484375 0.156250 0
L3 0 0.000000 4.750000 2.656250 0 4.750000 0.125000 0
G3 0 0.000000 0.110485 0.875000 1.906250 0
G3 0 0.000000 0.104816 2.390625 0.750000 0
G3 0 0.000000 0.093750 4.109375 1.718750 0
F3 0 0.000000 4
1.812500 1.937500 0
1.937500 1.937500 0
1.937500 1.781250 0
1.812500 1.781250 0
G3 0 0.000000 0.156250 5.218750 3.140625 0
G3 0 0.000000 0.174693 6.750000 3.171875 0
END##
With a little trial and error you will become proficient in developing structures and parameter files that can be useful not only for your own layout designs bit also for other users of the XTrackCAD community. By spending the time to compile structures into a new parameter file and contributing that file into the XTrackCAD community, you will be promoting the use of this excellent tool for the model railroad hobby. It is hoped that through the combined efforts of the users of XTrackCAD, we can create an extensive library of model train structures in each scale for the benefit of all hobbyists like ourselves.
And finally there is one last concept to consider. The intent of structures in XTrackCAD is for placing buildings and other such objects on your layout. But there is another use for structures. You can create structures which are used as alignment tools. These structures are templates that can be used for specialized alignment of track sections or other objects. An example of this is an urban street template that can be used to properly align buildings for a city. The template can be placed on the layout, the buildings aligned next to the roadway, and then the template can be removed if so desired. Another example is a vehicle structure that can be used to determine if the road or highway width is correct or if a parking lot contains enough room for the desired number of vehicles. A track gauge could be created to check for separation between tracks or spacing to a loading dock at an Industrial site. There are many other uses that are left to your imagination. So if you create a useful tool or structure, please consider contributing your parameter file to the XTrackCAD community through the User Group. Enjoy and have fun!