Menu

LayoutFile

FileFormat (7)
Russell Shilling

Layout File Header

These lines start a Layout file (*.xtc)

#XTrackCAD(sp)Version:(sp)Version-Number-String(sp)Date:(sp)Time-and-Date
VERSION(sp)Parameter-Version-No(sp)XTrkCAD-Version-String
These are set by Cmake when XTrackCAD is being built
TITLE1(sp)TitleText
TITLE2(sp)TitleText2
MAPSCALE(sp)map-scale
ROOMSIZE(sp)width(sp)x(sp)depth
SCALE(sp)scale-name

LAYERS(sp)Layer-number(sp)visible(sp)frozen(sp)on-map(sp)color-rgb(sp)module(sp)dont-use-color(sp)color-flags(sp)button-off(sp)"Layer-Name"(sp)inherit(sp)scale-index(sp)min-track-radius(sp)max-track-grade(sp)tie-length(sp)tie-width(sp)tie-spacing
* This is repeated for each defined layer
* Data elements after the Layer-Name are new in version 5.3.0
LAYERS(sp)CURRENT(sp)layer-number
LAYERS(sp)LINK(sp)layer-number(sp)"layer1;layer2;latern"
Note - This links the layer-number hide/show to a list of layers
LAYERS(sp)SET(sp)layer-number(sp)"file path for .xset file to load"

For example

#XTrackCAD Version: 5.2.0, Date: Sat Apr 22 17:11:15 2020
VERSION 12 5.2.0
TITLE1 Scarborough Model Railroad
TITLE2 N Layout
MAPSCALE 102
ROOMSIZE 420.000000 x 408.000000
SCALE N
LAYERS 0 1 0 1 255 0 0 0 0 "Table Edge"
LAYERS 1 1 0 1 32768 0 0 0 0 "Main Staging"
LAYERS 2 1 0 1 8388608 0 0 0 0 "Lower"
LAYERS 3 1 0 1 0 0 0 0 0 "Upper"
LAYERS 4 1 0 1 16711680 0 0 0 0 "Branch"
LAYERS 5 1 0 1 0 0 0 0 0 "free"
LAYERS 6 1 0 1 8388608 0 0 0 0 "Orange"
LAYERS 7 1 0 1 8388736 0 0 0 0 "Mountain"
LAYERS 8 1 0 1 8421376 0 0 0 0 "Feeders"
LAYERS 9 1 0 1 16384 0 0 0 0 ""
LAYERS 11 0 0 1 128 0 0 0 0 ""
LAYERS 12 0 0 1 32768 0 0 0 0 ""
LAYERS 13 0 0 1 16776960 0 0 0 0 ""
LAYERS 14 0 0 1 65280 0 0 0 0 ""
LAYERS 15 0 0 1 65535 0 0 0 0 ""
LAYERS 16 0 0 1 8388608 0 0 0 0 ""
LAYERS 17 0 0 1 8388736 0 0 0 0 ""
LAYERS CURRENT 8
LAYERS LINK 1 "2;3;4"
LAYERS SET 2 "/Users/arichards/.xtrkcad/NGauge.xset"
LAYERS SET 4 "/Users/arichards/.xtrkcad/Nn2Gauge.xset"

The format Version number is followed by the version of XTrackCAD that wrote the file. This is used in a message for users if the level being used can not read this format to state which level is the minimum level of code needed.

Layout File Trailer

The Layout file is terminated by
END$TRACKS


Related

Wiki: FileFormats

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.