-
Notifications
You must be signed in to change notification settings - Fork 0
/
netExport.bat
36 lines (29 loc) · 1.38 KB
/
netExport.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
:: Example of using this script
:: runNetworkcompare.bat "C:\Temp\Research\SampleCubeNet" "S7_2010_7071.net" Skip NoSkip
:: The above command will export only the nodes of the network in the given location. Link exporting is skipped.
:: Use the two "skip" parameters to decide whether one/both node/link need to be exported
SET VOYAGER=C:\Progra~2\Citilabs\CubeVoyager\Voyager.exe
SET netLocation=%1
SET netName=%2
SET skipLink=%3
SET skipNode=%4
echo %netLocation%
set netLocation=%netLocation:"=%
echo %netLocation%
echo %netName%
set netName=%netName:"=%
echo %netName%
set "netNamebegin=%netName:.net="^&REM #%
SET linkShape=%netLocation%\%netNamebegin%_link.shp
SET nodeShape=%netLocation%\%netNamebegin%_node.shp
rem Creating the Cube Script file to export to shapefiles
echo RUN PGM=NETWORK > %netLocation%\NetworkToShape.s
echo FILEI NETI =%netLocation%\%netName% >> %netLocation%\NetworkToShape.s
if NOT %skipLink%==Skip (
echo FILEO LINKO=%linkShape% FORMAT=SHP >> %netLocation%\NetworkToShape.s
)
if NOT %skipNode%==Skip (
echo FILEO NODEO=%nodeShape% FORMAT=SHP >> %netLocation%\NetworkToShape.s
)
echo ENDRUN >> %netLocation%\NetworkToShape.s
%VOYAGER% %netLocation%\NetworkToShape.s /Start