Layout and Image Files

  About Layout Files

A layout for use in TrainPlayer consists of two files:

You can see for yourself -- an rrw file is plain text in xml format, so you can open it with Notepad or any text editor.  Better yet, change its extension to .xml and double-click -- it will open in your browser in collapsible outline form.

Image files can come from a variety of sources.  An image file suitable for TrackLayer use has these characteristics:

Layouts distributed with TrainPlayer are installed in the trainplayer\layouts directory (.rrw files) and trainplayer\layouts\images (.tpg).  When you create a new layout with TrackLayer, you can store it in the same directories and it will show up in the Open Layouts dialog.

The rrw file contains the name and relative location of its image file.  The two files need not be in the same location.


Preparing an Image

Images on Paper:  If you have a track plan from a book or magazine, or a drawing on a sheet of paper, the picture will need to be scanned or otherwise digitized.  Here are three ways to do this:

Images from the Web:  If you have a track plan on a Web page, you can save it as a JPG file for use in TrackLayer.  In Internet Explorer you can do this by right-clicking on the image and choosing Save Picture As...

Be sure you're saving the largest possible image.  Don't save a thumbnail picture.

Images in CAD programs:  all CAD programs save files in some format, and many will save to standard graphics formats.  If your CAD program can save to JPG, BMP, GIF, or PNG, you're all set -- just save the file in one of those formats, and it can be used in TrackLayer.

Many programs allow you to set export options, depending on the output format chosen.  If you can set options, be sure to choose "high resolution" or "highest quality" before you export.

If your program does not export to one of the formats listed above, but to another such as DXF or EPS, you will need to export to the supported format and then convert.  You can find conversion programs on the Internet -- for example, a search for "DXF to JPG" turns up several programs for converting CAD files to graphics.

As a last resort, you can take a screen shot:

  1. Open the layout in your CAD program, and adjust to make the image as large as possible.
  2. Press Print Screen on your keyboard.
  3. Start Paint, the system bitmap editing program.  On most systems Paint is found under Start > Programs > Accessories.
  4. Choose Edit Paste.  The screen image you captured is brought into Paint.
  5. Move the image.  When you paste, the image is automatically selected and ready to drag.  Drag so that the top left corner of the layout is at the top left of the Paint window.
  6. Crop.  Use the Select tool to draw a rectangle just around the border of the layout, then Edit Copy, File New, Edit Paste.  You should now have a picture of just the layout, without desktop or other surroundings.
  7. Save as JPG or BMP.

Loading an Image

To load an image file:

The image appears on the screen, overlaid with a default grid.


Creating a New Blank Layout

If you don't have an image and just want to sketch track on a blank screen, start by creating a space with the dimensions you have in mind.

  1. Choose File New. The New Layout panel appears:


     
  2. If you want a layout of standard size and dimensions, try the Size drop-down and see if your choice is there.  The program offers a collection of standard layout arrangements, including various NTrak modules.  If you choose one of the standard sizes, you can skip the rest of this section and just click Create.
     
    OR:
     
  3. Choose the scale you want in the Scale drop-down, and enter the dimensions you want in the Height and Width boxes.  Click OK to dismiss the dialog and create the new drawing space.
     
    You can select the units you want to use for display and data entry, using the drop-down at the right.  Units you select in this drop-down will be displayed throughout the program.