-
Notifications
You must be signed in to change notification settings - Fork 9
Command line parameters
gansaku edited this page Jun 2, 2018
·
16 revisions
CSLMapView now supports a set of command line parameters that specify how it behaves when it starts.
For example:
start /W cslmapview.exe foo.cslmap.gz -output foo.png -silent
Option | Parameters | Meaning |
---|---|---|
-input |
fileName | Loads specified cslmap file. If this is the first parameter, -input can be omitted. cslmapview foo.cslmap is same as cslmapview -input foo.cslmap . |
-output |
fileName | Writes map image to file. It should be specified with -input option, otherwise you'll get blank image file. All of png, jpeg, bmp and svg formats are supported. |
-silent |
The gui opens with minimized and shutdowns after execution. Since CSLMapView.exe returns control to the shell when it is started up, wait for completion with start /W (cmd.exe) or Start-Process -Wait (PowerShell) when writing batch processing. |
|
-printarea |
x1 , y1 , x2 , y2 (0<=value<=1, x2-x1>0, y2-y1>0) | Adds print area. Coordinates must be specified from 0.0 to 1.0 range. For examplecslmapview -area 0.333333,0.333333,0.666667,0.666667 Four numbers must be given as one argument. If you would like to insert space use double quotes as cslmapview -area "0.25, 0.25, 0.75, 0.75"
|
-area |
areas(0<value<=9) | Sets target areas. This must be used with -silent . |
-imagewidth |
outputImageWidth(<=20000) | Sets width of output image. The height will be calculated. If the print area is not specified, this is equal to -canvassize. As for svg, this parameter is meaningless. Use -svgsize instead. This must be used with -silent . |
-canvassize |
canvasSize(<=20000) | Sets canvas size. This must be used with -silent . |
-svgsize |
outputSvgImageSize | Sets image size of svg output. This must be used with -silent . |
Option | Parameters | Meaning |
---|---|---|
-locale |
localeName | Sets gui's language. For example: cslmapview -locale zh-CN
|
-log |
debug|info | For debugging use. |
start /W cslmapview foo.cslmap.gz -printarea 0.5,0.4,0.6,0.6 -output test.png -silent -imagewidth 2000 -area 9
powershell
cd X:\foo\steamapps\common\Cities_Skylines\CSLMapView
ls -File | where{$_.Name.EndsWith(".cslmap") -or $_.Name.EndsWith(".cslmap.gz")} | %{
$fn = $_.FullName;
$pos = $_.Name.LastIndexOf(".cslmap");
$name = $_.Name.Substring(0,$pos) + ".png";
$a = @("""$fn""","-output","""$name""","-silent");
Start-Process -Wait .\cslmapview -ArgumentList $a
}