Friends familiar with Skyline will know that in the Terrabuilder and Terraexplorer Pro Software installation directory, provides a lot of gadgets (exe program);
Although we don't see the source code for these gadgets, we can still invoke them in a custom development environment;
In particular, can be used to achieve a number of bulk operations and automated operations;
Common gadgets:
MakeXpl.exe;
MakeCPT.exe;
triangulate irregular elevation Grid.exe;
Convert XYZ ASCII Elevation.exe;
Convert Z ASCII Elevation.exe;
Gather tiled Files.exe;
Split and Merge mpu-mpt Files.exe
......
Call cmd in C # to execute the command, the network can find a lot of methods and parameters used to set up sample code;
#region "Run tool convert XYZ to tri"//Run tool to convert XYZ to Tri//Zhaohe 2016.8.19//input xyz file path and tri file path and sample accuracy private void Xyztotri (String inputfile, String outputFile, Double resolution) {String programname = Tempdatapath + @ "\ttd.exe";; String cmd = "\" "+ ProgramName +" \ "" + "-inputfile" + inputfile + "-outputfile" + OutputFile + "-resolution" + res Olution + "&exit"; using (Process proc = new process ()) {Proc. Startinfo.createnowindow = true; Proc. Startinfo.filename = "cmd.exe"; Proc. Startinfo.useshellexecute = false; Proc. Startinfo.redirectstandardinput = true; Proc. Startinfo.redirectstandardoutput = true; Proc. Startinfo.redirectstandarderror = true; Proc. Startinfo.errordialog = false; Proc. Startinfo.windowstyle = Processwindowstyle.hidden; Proc. Start (); Proc. Standardinput.writeline (CMD); Proc. Standardinput.autoflush = true; Gets the output information of the cmd window Proc. Standardoutput.readtoend (); Proc. WaitForExit ();//waits for the program to finish executing the exit process Proc. Close (); }} #endregion
For how to run cmd in C #, refer to the blog of other friends in the garden: http://www.cnblogs.com/babycool/p/3570648.html#undefined
How to invoke the gadgets provided in Skyline Software through C # development