How to invoke the gadgets provided in Skyline Software through C # development

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.