Page 1 of 2

Re: Things to make the Gcode editor better !

PostPosted: Sun Sep 16, 2018 6:04 am
by Haik
I think it would be useful if the user could point UCCNC to use an external application for gCode editing. For NC files I like to use Microsoft Visual Studio Code, which is freeware. Adding to that an extension (aka: plugin) by the name of nc-code which provides many NC editing features (see screenshot).

It would be great if I could just keep using what I'm used to. :geek:

vsCode.png
Microsoft Visual Studio Code w/nc-code extension/addin.

Re: Things to make the Gcode editor better !

PostPosted: Sun Sep 16, 2018 9:39 am
by Dan911
Haik wrote:I think it would be useful if the user could point UCCNC to use an external application for gCode editing. For NC files I like to use Microsoft Visual Studio Code, which is freeware. Adding to that an extension (aka: plugin) by the name of nc-code which provides many NC editing features (see screenshot).

It would be great if I could just keep using what I'm used to. :geek:

vsCode.png



UCCNC can point to an external application to edit your Gcode.

1. Create a Macro with a # between 20000 - 21999
2. Add code below, replace notepad.exe in quotations with exe you want to open.
3. Using screen edit in UCCNC change the button number for the Edit File button from 126 to the macro number you used.

Once you save file in external application and close it UCCNC will reload the edited file.

Dan

Code: Select all
string gcpath = exec.Getgcodefilename();
System.Diagnostics.Process.Start("notepad.exe",gcpath).WaitForExit();
exec.Loadfile(gcpath);


//////////////////////////////////////////////////////////////////////////////////////

Terry I created a UCCNC Unit Converter plugin, I will post in the toolbox section.

Re: Things to make the Gcode editor better !

PostPosted: Sun Sep 16, 2018 10:18 am
by Robertspark
viewtopic.php?f=15&t=687

viewtopic.php?f=15&t=686

Examples in the toolbox section and a transparent button image if you want one, save reinventing the wheel

Re: Things to make the Gcode editor better !

PostPosted: Sun Sep 16, 2018 10:27 am
by Dan911
Robertspark wrote:http://www.forum.cncdrive.com/viewtopic.php?f=15&t=687

viewtopic.php?f=15&t=687
viewtopic.php?f=15&t=686

Examples in the toolbox section and a transparent button image if you want one, save reinventing the wheel



Sorry Robert I didn't know of them post otherwise I would of used links, forum not allowing me to edit my post.

Dan

Re: Things to make the Gcode editor better !

PostPosted: Sun Sep 16, 2018 10:34 am
by Robertspark
No problem, I was sitting back anyway and watching to see if Terry wanted it to do something different (I've not edited gcode directly within uccnc, I use notepad++ (each to their own + what works for you works, don't fix what ain't broke etc)

It was only when you mentioned macros and buttons I thought someone may be looking for a transparent button then you just edit the background and click in that position.

I was looking how much was in the toolbox section and was impressed, I was wondering if the default view in the toolbox section could be increased from 10 items in the list to 25 (as the screenset thread) or more that way more are on view instead of clicking on buttons to shift across between thread pages

Re: Things to make the Gcode editor better !

PostPosted: Sun Sep 16, 2018 1:31 pm
by ger21
Maybe you've been in the box for too long. :twisted:

How many users would actually use any of these features? Maybe 1%-2%?

Re: Things to make the Gcode editor better !

PostPosted: Sun Sep 16, 2018 9:55 pm
by Derek
I hate the built in editor with a passion. I would love to be able to select my own editor.

Re: Things to make the Gcode editor better !

PostPosted: Mon Sep 17, 2018 12:40 am
by Robertspark
I can only speak for myself. I like notepad++ because it will highlight different things (gcodes, modes, text feedrate, spindle speed etc) with different colours (I'll post a screenshot later)

Plus it has autocomplete (or it can do), so the text pops up as you are typing it.

Also if I highlight one section of code say m206 it will highlight all instances as well in the file.

Hit CTL+f and it will find (And or replace) whatever I've highlighted

Re: Things to make the Gcode editor better !

PostPosted: Mon Sep 17, 2018 1:07 am
by Robertspark

Re: Things to make the Gcode editor better !

PostPosted: Mon Sep 17, 2018 8:08 am
by Haik
Thank you Dan (dan911)... your instructions and snippet worked perfectly!