Menu

ConfigurationFile

Russell Shilling

Configuration File

File Name

The configuration file is called
* xtrkcad.rc on Mac and Linux
* xtrkcad.ini on Windows

It is located
* in the hidden ~/.xtrkcad working directory on Mac and Linux
* in the User\userid\AppData\Roaming\XTrackCad\ working directory on Windows

Its purpose is to store values that are restored when XTrackCAD is started

Use of Settings Files in Layers

Note - All settings (and even settings not listed) can be stored as .xset files for use in Layers as setting files. But not every value will be effectively set when they are used, because many are loaded once at startup and never refreshed, or only stored subsequently.

Those settings that relate to individual commands in Misc or Dialog Item are most likely to be loaded when the command is Started (e.g., the menu button is clicked). Exceptions are the scale/gauge that is forced to be loaded when the layer is activated - which causes a cascade of settings when other commands are activated because they are stored per scale/gauge. You can see these below because the key2 value ends with the scale/gauge.

Data Format

In Windows, the Format is
[Section]
key1=value1
key2=value2

In Mac/Linux the format is

Section.key1: value1
Section.key2: value2

The Mac/Linux style is used in the examples below except when the value is only present on Windows

Note that for decimal values, the separator is a language preference and so the values below may have the decimal "point" (.) replaces with a "decimal comma" (,).

Sections List

Layers

The Personal Preference template for Layers is stored like this (note only present if the user has stored one!)

Layers.name.0: LayerName
Layers.color.0: 13528100
Layers.flags.0: 6

The Windows equivalent records are

[Layers]
name.0=LayerName
color.0=13528100
flags.0=6

Note the layers have a zero base, so 0 = 1, 1 =2 and so forth

The flags field encompasses the hidden, frozen and module settings

flags definitions
All bits 0 Un-checked
bit 1 - Frozen - Checked
bit 2 - On Map - Checked
bit 3 - Visible - Checked
bit 4 - No Button - Checked

Here is a section of .rc from Mac/Linux

[Layers]
layers=0,1,2,3,4,5,6
name.0=Track
color.0=13528100
flags.0=6
name.1=Benchwork
color.1=128
flags.1=6
name.2=Structures
color.2=8388608
flags.2=6
name.3=RollingStock
color.3=65535
flags.3=6
name.4=Landscape-Base
color.4=32768
flags.4=6
name.5=Landscape-Elev1
color.5=16776960
flags.5=6
name.6=Landscape-Elev2
color.6=65280
flags.6=6

The layers record shows which layers are active

Layers.layers: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15

In Windows

layers=0,1,2,3,4,5,6

The list record shows which layers are grouped together

Layers.list.1: 2;3;4

The settings record shows which settings file will be activated when the layer becomes current

Layers.settings.1: /Users/fred/.xtrkcad/gauge00.xset

Preferences

Preferences are intended for users to be able to set up some startup values

Preference.LargeIcons: 1.5

The LargeIcons value can be from 1.0 to 2.0

Note that the decimal separator can be set by system LANG preference, and so with LANG=GE_de, for example, the value would be "1,5".

Parameter File Map

The Parameter File Map stores the names of the parameter files that were loaded

Parameter File Map.North American Prototypes: /Users/richardsa/install/xtrkcad-tip/share/xtrkcad/params/protoam.xtp

DialogItem

Default settings for many Options Dialog settings

DialogItem.rotate-rotate: 0.000000
DialogItem.move-moveX: 0.000000
DialogItem.move-moveY: 0.000000

DialogItem.print-scale: 16
DialogItem.print-format: 0
DialogItem.print-order: 0
DialogItem.print-style: 1
DialogItem.print-registrationMarks: 1
DialogItem.print-pageNumbers: 1
DialogItem.print-grid: 0
DialogItem.print-ruler: 0
DialogItem.print-centerLine: 0
DialogItem.print-roadbed: 0
DialogItem.print-roadbedWidth: 0.000000
DialogItem.print-physsize: 0
DialogItem.print-origx: 0.000000
DialogItem.print-origy: 0.000000
DialogItem.print-origa: 0.000000

DialogItem.outputbitmap-toggles: 3
DialogItem.outputbitmap-density: 10.000000

DialogItem.grid-horzspacing: 12.000000
DialogItem.grid-horzdivision: 12
DialogItem.grid-horzenable: 0
DialogItem.grid-vertspacing: 12.000000
DialogItem.grid-vertdivision: 12
DialogItem.grid-vertenable: 0
DialogItem.grid-origx: 0.000000
DialogItem.grid-origy: 0.000000
DialogItem.grid-origa: 0.000000
DialogItem.grid-show: 0

DialogItem.easement-val: 0.000000
DialogItem.easement-r: 0.000000
DialogItem.easement-x: 0.000000
DialogItem.easement-l: 0.000000

DialogItem.circle-radius: 18.000000
DialogItem.parallel-separation: 2.000000
DialogItem.parallel-factor: 0.000000

DialogItem.turnout-hide: 0
DialogItem.structure-hide: 0

DialogItem.helix-elev: 0.000000
DialogItem.helix-radius: 18.000000
DialogItem.helix-turns: 5
DialogItem.helix-angSep: 0.000000
DialogItem.helix-grade: 0.000000
DialogItem.helix-vertSep: 0.000000

DialogItem.elev-mode: 1
DialogItem.elev-value: 4.000000
DialogItem.elev-station:
DialogItem.addElev-value: 0.000000

DialogItem.draw-linewidth: 0
DialogItem.draw-linecolor: 0
DialogItem.draw-benchcolor: 16760832
DialogItem.draw-arrowsize: 0
DialogItem.draw-Length: 7.375636
DialogItem.draw-BoxWidth: 6.500000
DialogItem.draw-Angle: 270.000000
DialogItem.draw-Radius: 0.000000
DialogItem.draw-Type: Solid

DialogItem.layout-title1: Double Garage
DialogItem.layout-title2: Layout Plan by Adam (tynewydd962)
DialogItem.layout-maxtrackgrade: 5.000000
DialogItem.layout-backgroundfile:
DialogItem.layout-backgroundposX: 0.000000
DialogItem.layout-backgroundposY: 0.000000
DialogItem.layout-backgroundWidth: 0.000000
DialogItem.layout-backgroundScreen: 0
DialogItem.layout-backgroundAngle: 0.000000

DialogItem.display-color-track: 0
DialogItem.display-color-draw: 0
DialogItem.display-tunnels: 1
DialogItem.display-endpt: 2
DialogItem.display-unconnected-endpt: 0
DialogItem.display-tiedraw: 1
DialogItem.display-centerdraw: 0
DialogItem.display-tworailscale: 16
DialogItem.display-mapscale: 64
DialogItem.display-zoom-corner: 0
DialogItem.display-livemap: 0
DialogItem.display-autoPan: 0
DialogItem.display-labelenable: 0
DialogItem.display-labelscale: 8
DialogItem.display-description-fontsize: 48
DialogItem.display-hotbarlabels: 0
DialogItem.display-layoutlabels: 6
DialogItem.display-listlabels: 7
DialogItem.display-carhotbarlabels: 1
DialogItem.display-trainpause: 300
DialogItem.display-hideTrainsInTunnels: 0

DialogItem.cmdopt-preselect: 1
DialogItem.cmdopt-rightclickmode: 0
DialogItem.cmdopt-selectmode: 0
DialogItem.cmdopt-selectzero: 1

DialogItem.pref-anglesystem: 0
DialogItem.pref-units: 0
DialogItem.pref-dstfmt: 1
DialogItem.pref-minlength: 0.100000
DialogItem.pref-connectdistance: 0.100000
DialogItem.pref-connectangle: 1.000000
DialogItem.pref-turntable-angle: 15.000000
DialogItem.pref-coupling-speed-max: 100
DialogItem.pref-balloonhelp: 1
DialogItem.pref-showflextrack: 1
DialogItem.pref-dragpixels: 20
DialogItem.pref-dragtimeout: 500
DialogItem.pref-mingridspacing: 5
DialogItem.pref-checkpoint: 2
DialogItem.pref-onstartup: 0

DialogItem.rgbcolor-snapgrid: 65280
DialogItem.rgbcolor-marker: 16711680
DialogItem.rgbcolor-border: 0
DialogItem.rgbcolor-crossmajor: 16711680
DialogItem.rgbcolor-crossminor: 255
DialogItem.rgbcolor-normal: 0
DialogItem.rgbcolor-selected: 16711680
DialogItem.rgbcolor-profile: 16711935
DialogItem.rgbcolor-exception: 16711808
DialogItem.rgbcolor-tie: 16744448

DialogItem.turnoutNew-len0: 0.000000
DialogItem.turnoutNew-len1: 0.000000
DialogItem.turnoutNew-len2: 0.000000
DialogItem.turnoutNew-len3: 0.000000
DialogItem.turnoutNew-off0: 0.000000
DialogItem.turnoutNew-off1: 0.000000
DialogItem.turnoutNew-off2: 0.000000
DialogItem.turnoutNew-off3: 0.000000
DialogItem.turnoutNew-rad0: 0.000000
DialogItem.turnoutNew-rad1: 0.000000
DialogItem.turnoutNew-rad2: 0.000000
DialogItem.turnoutNew-rad3: 0.000000
DialogItem.turnoutNew-toeL: 0.000000
DialogItem.turnoutNew-toeR: 0.000000
DialogItem.turnoutNew-angle0: 0.000000
DialogItem.turnoutNew-angle1: 0.000000
DialogItem.turnoutNew-angle2: 0.000000
DialogItem.turnoutNew-angle3: 0.000000
DialogItem.turnoutNew-manuf:
DialogItem.turnoutNew-desc1:
DialogItem.turnoutNew-partno1:
DialogItem.turnoutNew-desc2:
DialogItem.turnoutNew-partno2:
DialogItem.turnoutNew-roadbedWidth: 0.000000
DialogItem.turnoutNew-roadbedLineWidth: 0
DialogItem.turnoutNew-color: 0
DialogItem.turnoutNew-angleMode: 1
DialogItem.turnoutNew-slipMode: 0

DialogItem.custmgm-newtype: 0
DialogItem.contents-label:
DialogItem.layer-button-count: 10
DialogItem.rescale-change-dim: 0
DialogItem.rescale-ratio: 0.000000

DialogItem.carpart-bodyColor: 16744448
DialogItem.carinv-sort1: 0
DialogItem.carinv-sort2: 1
DialogItem.carinv-sort3: 2
DialogItem.carinv-sort4: 3
DialogItem.carinv-list: 0

DialogItem.train-newcar-index:
DialogItem.misc-toolbarset: 65535
DialogItem.misc-cur-turnout-ep: 0
DialogItem.sticky-set: 67108479
DialogItem.demo-speed: 5
DialogItem.tip-showatstart: 0
DialogItem.prmfile-mode: 0

DialogItem.describe-F1: 142.333333
DialogItem.describe-F2: 115.750000
DialogItem.describe-F3: 348.818246
DialogItem.describe-F4: 140.250000
DialogItem.describe-F5: 0.000000
DialogItem.describe-F6: 0.000000
DialogItem.describe-F7: 256.867108
DialogItem.describe-F8: 189.336503
DialogItem.describe-F9: 89.882331
DialogItem.describe-F10: 5.483401
DialogItem.describe-F11: 3.495412
DialogItem.describe-F12: 204.857237
DialogItem.describe-F13: 208.352649
DialogItem.describe-F14: 0.000000
DialogItem.describe-F15: 46.590683
DialogItem.describe-F16: 0.070747
DialogItem.describe-F17: 38.776302
DialogItem.describe-F18: 43.340362
DialogItem.describe-F19: 0.000000
DialogItem.describe-Y1: 1
DialogItem.describe-P1: 111381386887168

DialogItem.signalEdit-origx: 93.375000
DialogItem.signalEdit-origy: 96.218750
DialogItem.signalEdit-origa: 0.000000
DialogItem.describe-I1: 7
DialogItem.describe-S1: Me
DialogItem.display-color-layers: 0
DialogItem.cmdopt-move-quick: 0
DialogItem.pref-autosave: 5

DialogItem.display-constrainmain: 0

DialogItem.group-replace: 1

DialogItem.describe-C1: 0
DialogItem.describe-LE1: 200
DialogItem.describe-boxed1: 4294967297
DialogItem.describe-boxed2: 0
DialogItem.text-Fontsize: 18
DialogItem.text-Color: 0
DialogItem.text-Boxed: 0
DialogItem.group-orig: 0.000000
DialogItem.group-origy: 0.000000
DialogItem.describe-I2: 0
DialogItem.describe-L1: 0
DialogItem.describe-boxed3: 4294967296
DialogItem.describe-S2: Six-Span Viaduct
DialogItem.describe-S3: 1

Layout

layout.BackgroundPosX: 0.000000
layout.BackgroundPosY: 0.000000
layout.BackgroundAngle: 0.000000
layout.BackgroundScreen: 0
layout.BackgroundSize: 0.000000

Gtklib window pos

gtklib window pos.layout: 212 -2
gtklib window pos.prmfile: -4 -2

gtklib window pos.easement: 392 17
gtklib window pos.describe: 385 8

gtklib window pos.searchgui: -4 -2

gtklib window pos.aspectEdit: -5 -3
gtklib window pos.signalEdit: 322 20

gtklib window pos.rgbcolor: -4 -2

gtklib window pos.demo: 775 259

gtklib window pos.profile: -5 -3
gtklib window pos.turnout: -4 -2
gtklib window pos.textEdit: -5 -3
gtklib window pos.group: 333 17

gtklib window pos.elev: 414 20
gtklib window pos.layer: 331 -2

Gtklib window size

gtklib window size.tip: 481 216

gtklib window size.signalEdit: 626 398
gtklib window size.signalEdit: 626 398

gtklib window size.demo: 425 303

gtklib window size.profile: 508 260
gtklib window size.turnout: 607 331

Draw

draw.mainwidth: 1270
draw.mainheight: 403

draw.zoom: 6.000

draw.roomsizeX: 254.000000
draw.roomsizeY: 180.000000

draw.mapscale: 22

Filelist

Recent layout files

filelist.file1: /Users/richardsa/Documents/port_dinllean2.xtc

Misc

Misc values are often ones that

misc.firstrun: 0
misc.max-toolbarset: 8191
misc.toolbarset: 40959
misc.benchtype-rect: 1 1 6 2 2 4 2 6 6 2 8 8 4 4 4
misc.benchtype-lgrider: 2 4 5 3 4 6 4 5 8
misc.benchtype-tgrider: 2 4 4 3 4 7 4 5 8

misc.scale: OO
misc.hotbar-start: 0
draw.maximized: 0
misc.tip-number: 53

misc.mapVisible: 0

misc.parallel-line-separation-HO: 0.689000

misc.desired_radius: 24.000000
misc.playbackspeed: 5
misc.parallel-line-separation-N: 0.375000
misc.minTrackRadius-HO: 18.000000
misc.magnets: 1
misc.minTrackRadius-OO: 20.574803
misc.minTrackRadius-N: 9.750000

Gtklib window size

gtklib window size.prmfile: 920 495
gtklib window size.map: 476 271

Gtklib window pos

gtklib window pos.map: -5 -25
gtklib window pos.pref: -4 -2

gtklib window pos.display: -4 -2

Paths

paths.params: /Users/richardsa
paths.layout: /Users/richardsa/Documents

TieData

Each "scale" can have its own tiedata section.

tiedata-OO9.length: 1.0
tiedata-OO9.width: 0.1
tiedata-OO9.spacing: 0.2


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.