Please make G-code editor user selectable

Here is where you can request new features or special features.

Re: Please make G-code editor user selectable

Postby Robertspark » Wed Sep 28, 2016 10:19 pm

Hmm... I see what you're saying.... and I didn't consider that what you're trying to do is edit the g-code on the fly and once its edited reload it back into the machine....

Whereas the process I use is:
I load the gcode into the machine, and if something does not look right, close the file, then open it in notepad++, edit it, save, and reload into uccnc....

For me its not important that I edit the g-code on the fly (manually saving and reloading it is no great issue for me, and besides its normally just something that I'm working through and will edit my cut operations or post processor in sheetcam so it resaves the file with the corrections I need (its mainly been THC setup m-codes for me at present.... and once thats sorted I should not really be editing the g-code as the post processor should get it right [plus the touch off routine macro]

Is there a way (screenset function) that could be added which would call a programme? ...... say something like StartExtProg("C:\Program Files (x86)\Notepad++\notepad++.exe -lUCCNC") .... hence a buttonpress would start notepad++ (or any other programme you choose) .... [note: I've added the language switch for notepad++ to use UCCNC language definition as I posted elsewhere.... there are other switches which may be useful, hence if uccnc knew the location of the *nc / *.tap file, it could pass this file location and close the g-code file which would allow notepad to open it and edit it directly, then you save and close notepad and ask uccnc via screenset buttonpress to reload the last g-code file and it should pop back up?

Commandline switches here:
http://docs.notepad-plus-plus.org/index.php/Command_Line_Switches

(don't create a macrocode just for me, there needs to be some consensus from users for a way forward, I don't want anyone wasting their time for one users agenda..... notepad++ is pinned to my taskbar, I can open it in one click almost as quick as what I've explained above, the difference is UCCNC would pass the last g-code file via switch to notepad++ directly)
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Please make G-code editor user selectable

Postby cncdrive » Wed Sep 28, 2016 11:12 pm

There is the System.Diagnostics.Process.Start("notepad.exe"); function which you can use in C#.
This example will start an empty notepad, but you can also pass the filename.

You can open up your file like this: System.Diagnostics.Process.Start("notepad.exe", fileName);
Or you can open your file with it's associated editor in Windows, like this: System.Diagnostics.Process.Start(fileName);
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: Please make G-code editor user selectable

Postby cncdrive » Wed Sep 28, 2016 11:18 pm

Also you can make the macro to wait until your Process exits like this :

System.Diagnostics.Process process = System.Diagnostics.Process.Start("notepad.exe");
process.WaitForExit();
MessageBox.Show("Process finished");
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Previous

Return to Feature Request

Who is online

Users browsing this forum: No registered users and 3 guests