File changed weird behavior

Post anything you want to discuss with others about the software.

File changed weird behavior

Postby Mark81 » Fri Feb 22, 2019 5:57 pm

Often when I'm working on a new file I generate several time the g-code from my CAM e do dry runs on the machine.
It seems UCCNC doesn't warn the user when the file currently loaded has changed on disk. While I think this is useful and might help to avoid errors (say unwanted overwriting of a test export) the weird behavior is if you click "edit file" you see the actual contents, but if you cycle run, it will run the old version! To update the running one you have to close the file and open again.

Is there a way to:
1. get a warning message when the file has changed
2. get a consistent contents between editor and viewer/execution
3. reload the updated file without close and manually browse it again

Thanks in advance!
Mark81
 
Posts: 42
Joined: Thu Feb 14, 2019 4:38 pm

Re: File changed weird behavior

Postby cncdrive » Fri Feb 22, 2019 6:49 pm

Currently there is no way or at least I have no idea how to do it, but we will think about the solution...
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: File changed weird behavior

Postby dezsoe » Fri Feb 22, 2019 9:37 pm

The 3rd point is already solved: left to the toolpath view there's a "Reload" button that will do exactly what you need. (In the latest test versions there's also an option on the Configuration/Appearance tab to disable the toolpath view reset on reload, so you can easy see the change when reloading.)
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: File changed weird behavior

Postby ger21 » Sat Feb 23, 2019 1:05 am

I think that "Save and Exit" from the editor needs to do a reload. That should fix the issue. no?

#1 is probably not possible, as once the file is loaded, and apparently closed, you can't be expected to monitor it's contents
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: File changed weird behavior

Postby Dan911 » Sat Feb 23, 2019 3:09 am

ger21 wrote:I think that "Save and Exit" from the editor needs to do a reload. That should fix the issue. no?


Yes... The editor is just using the gcode file path UCCNC has loaded, so if going to make changes to file after loaded in UCCNC than open in editor and save.
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: File changed weird behavior

Postby ger21 » Sat Feb 23, 2019 11:37 am

Dan911 wrote:Yes... The editor is just using the gcode file path UCCNC has loaded, so if going to make changes to file after loaded in UCCNC than open in editor and save.


Dan, currently that doesn't update the code in UCCNC, if the file was changed before opening it in the Editor. When exiting the Editor, UCCNC needs to reload the file. It currently does not.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: File changed weird behavior

Postby cncdrive » Sat Feb 23, 2019 11:55 am

OK, but reloading the file means recompiling (re-interpreting it).
And if the user changed the file inside the editor then if we reload it before exit then the changes the user made in the editor will be lost!
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: File changed weird behavior

Postby Dan911 » Sat Feb 23, 2019 12:58 pm

ger21 wrote:
Dan911 wrote:Yes... The editor is just using the gcode file path UCCNC has loaded, so if going to make changes to file after loaded in UCCNC than open in editor and save.


Dan, currently that doesn't update the code in UCCNC, if the file was changed before opening it in the Editor. When exiting the Editor, UCCNC needs to reload the file. It currently does not.


Ok, sorry for the bad info..

I use my own editor and assumed UCCNC editor worked the same way, each time editor is opened it loads file from Gcode file path same as UCCNC editor but if saved
it will reload the file. IMO this is how it should work.

Dan
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: File changed weird behavior

Postby ger21 » Sat Feb 23, 2019 3:32 pm

cncdrive wrote:And if the user changed the file inside the editor then if we reload it before exit then the changes the user made in the editor will be lost!


You should only reload with Save and Exit, I think?? No?
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: File changed weird behavior

Postby Dan911 » Sat Feb 23, 2019 5:07 pm

My guess is the editor is checking for a change in file within the editor to reload or not.
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Next

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 14 guests