Debugging and Repairing

Preparing a layout in TrackLayer is a many-step process fraught with possibilities for error.  This section gives some tips for avoiding errors and describes tools to help you spot and correct them.

Zoom in

Work on one section of the layout at a time.  Zoom in so you have room to work. 

You can draw tracks out to the edges of the window, then when you scroll over to work on the next section, hook up or move the disconnected track ends.

Inspect visually

When you are working in a crowded area, it's easy to forget a crossover or siding, and it's not easy to tell you've done it.  Here are two ways to check for missing track:

Test the layout


Run the track checker

TrackLayer can help you find errors.  Use the command Tools > Check Track.  This runs a series of tests against the layout, as listed in the table below. 

If errors are found, they are listed in an alert box as shown.  Each error is listed with an object type (3-letter code from the following table), the object's number, and the error text; the corresponding track or junction on the layout is highlighted in pink.

STR straight track section
CUR curved track
JXN junction / switch
CTR circle center
CAR car
TRN train
CIR circle
TTB turntable
STN station

In the example shown, tracks 34, 70, and 153 meet near a common point, but there is no switch there.  The fix is to drag junction 152 on top of 68, so a switch is created.

Error conditions found by Check Track include:

Object flagged for delete object has been deleted
Invalid object ID object ID is out of range
Unretrievable object object no longer exists in memory
Invalid junction number on track junction number on one end of track is out of range
Same junction number on both ends of track track has both ends on same junction
Bad track length track length is zero
Invalid station number track points to non-existent station
Object has zero space track or circle has no dimensions
Junction has no tracks invalid junction, disconnected from any track
Invalid track number on junction junction is connected to invalid track ID
Superimposed junctions two junctions are at or near the same place
Invalid radius circle radius is zero or negative
Station is missing name station object has no name
Tracks superimposed two track segments are on the same line segment
Endpoint on track but no junction endpoint of one track lies near point on another track

Highlight a track or junction

If an error message gives a track or junction number you're having trouble finding on the layout, use Tools > Highlight Track.

  In the Track Highlight dialog, enter the track or junction number.  The corresponding object will be highlighted in pink on the layout.

To turn off the pink highlight, click any empty space on the layout, as if removing a selection, or use View > Refresh.