Page 1 of 2

Recently Loaded Files.

PostPosted: Sun Jun 10, 2018 8:44 pm
by Dan911
I read this in the Feature Request section and thought it was a good idea and I could find use, had some play time today and was simple to write. This plugin will save the last 10 Gcode files loaded in UCCNC removing the oldest when replacing with new. You can click on file to quickly load.

Recently Loaded.JPG



1. Put dll file in your UCCNC Plugin folder and check Call Startup and Enable.

2.Create a button in screen edit and give it button# 6222, or create a hotkey and use 6222 for function code, or put macro I included in zip file
and add to the Multi Macro button I previously uploaded.

Dan

Recently Loaded.zip
(7.34 KiB) Downloaded 1000 times

Re: Recently Loaded Files.

PostPosted: Sun Jun 10, 2018 9:57 pm
by beefy
Cheers Dan,

that's a feature I use in any program that has it, very useful.

Keith.

Re: Recently Loaded Files.

PostPosted: Mon Jun 11, 2018 1:10 am
by Dan911
Vmax549 wrote:One thing I noticed is that the LIST is not persistant. It only shows files that you load during that session.

(;-) TP


You need to check "Call startup" along with "Enable" in Configure Plugins. The Call startup event is where it loads saved files from the pro file.
I did consider loading files in code to avoid users forgetting to check and having this problem but old habits are hard to break. Besides it seems to me so much cleaner/safer to have settings loaded before plugin begins. I also use the shut down event to save.

Dan

Re: Recently Loaded Files.

PostPosted: Mon Jun 11, 2018 1:39 am
by Dan911
What UCCNC version you using? All my testing was on 47 without issue.

Re: Recently Loaded Files.

PostPosted: Mon Jun 11, 2018 3:19 am
by Dan911
Vmax549 wrote:Currently 2104

Update, IF I load the default profile it works.

If I load another profile it does NOT work. It will write the pro file. But does not load the list.

(;-) TP


Hey Terry, what's happening is the plugin is loading saved files from profile used at startup and saving files to profile used when closing. I see it's probably best to save files at time of loading in UCCNC to
profile used instead of at closing for the uses who switch between profiles. The user also has to remember to go to configure plugin and check enable and Startup for each profile used.

Will take a better look tomorrow, thanks for the update.

Dan

Re: Recently Loaded Files.

PostPosted: Mon Jun 11, 2018 2:27 pm
by Dan911
I could not reproduce any problems with 2047 and 2104.

Taking another look this morning with a clearer head, the only other possible scenario that's happening is your loading Gcode files with plugin window open. This will work with loading a file into UCCNC with window open but continually loading files it's only going to save last file until window is closed and stored in proper position.

I will take a better look at this flaw and fix. Like I stated in first post this is a simple plugin, what makes any plugin tough when you share is trying to preempt different scenario's user's may do.

Thanks for your help,
Dan

Re: Recently Loaded Files.

PostPosted: Mon Jun 11, 2018 5:06 pm
by Dan911
Saving/Writing to profile as mentioned before is definitely flaw using the shutdown event. Writing to profile at time of Gcode file loaded is a better way and will ensure that it's writing to profile that loaded it....Thanks!

The quote below is what I'm having trouble grasping or reproducing, don't know why the startup event would have trouble finding profile or what I can do about it. Please elaborate so I know what to look at, If the plugin try's to read a value in profile that don't exist it should add it.

Vmax549 wrote:but when it has to READ teh pro file on startup it is NOT able to find teh pro file and that would throw an exception




Thanks for your help,
Dan

Re: Recently Loaded Files.

PostPosted: Mon Jun 11, 2018 7:24 pm
by dezsoe
Hi Dan,

I tried this plugin and it works with any profile. I had problems with the length of the filename field:

rcnt.png
rcnt.png (8.4 KiB) Viewed 17409 times

Re: Recently Loaded Files.

PostPosted: Tue Jun 12, 2018 8:51 am
by Dan911
dezsoe wrote:Hi Dan,

I tried this plugin and it works with any profile. I had problems with the length of the filename field:



Thanks Dezsoe, this did have me chasing my tail a bit. If any1 request I will certainly compile with a wider window or a smaller font.

Thanks for the testing Terry, if it's anything I can do to help with your conflict let me know.

Dan

Re: Recently Loaded Files.

PostPosted: Tue Jun 12, 2018 9:10 am
by dezsoe
Hi Dan, No problem, I won't use this plugin, just remarked. (The plugin works fine, but I only need the last opened file and my QuickView plugin which I use for opening files remembers that.)