# Creating Track Formation

Predefined track formations, e.g. a station or a turntable can be saved and used from the Library mode of the Add Track tool.

Tracks formations are loaded dynamically and custom ones can be created in the track formation directory. To open this directory run: EneRailroad::Template.open_dir(:track_formation).

## Create Directory (And define ID)

Each track formation template is saved in a sub directory named as its ID. This directory's name must start with your initial or some other rather unique character combination, followed by an underscore (_), to prevent name collisions.

IDs without leading initials (such as 'turntable rather than 'ene_turntable') are reserved for the formations shipped with the extension (and 'ene_' prefix is already reserved by me, Eneroth3). Using such an ID for your own formation may lead to it being overwritten when updating the extension.

Create a sub directory with the chosen ID as name to save the files in.

## Making the Model

Create a model named 'model.skp' in the directory you just created. For backward compatibility save models as Sketchup version 8.

Draw the tracks as usual. You may add other geometry such as platforms or buildings in the model.

## Create/Update Information

To enter a name and description of the track formation and make it appear in the Add Track Tool, run EneRailroad::Template.edit_properties in the Ruby console. This also updates the track placement information used by for previews and Add Track tool and should e done when tracks are changed.

## Distributing Track Formation

The whole folder for the track formation can easily be compressed, shared, and decompressed in someone else's track formation folder.

Copyright © Julia Christina Eneroth 2015.