CamBam

FeedBack => Bug Reports => Topic started by: EddyCurrent on August 21, 2014, 15:39:21 pm

Title: [25] Incorrect default path for 'Out File' (solved in V1 RC1)
Post by: EddyCurrent on August 21, 2014, 15:39:21 pm
1. A new project is opened from Template, the System path is chosen as default.
2. The 'Out File' input dialogue box is selected, it defaults to the System path.

I think this is incorrect, it should default to the <DefaultDrawingDirectory>

because if I do this, it works.

1. A new project is opened from Template, the System path is chosen as default.
2. Do a 'Save as' the  <DefaultDrawingDirectory> is selected
3. The 'Out File' input dialogue box is selected, it defaults to the <DefaultDrawingDirectory>

so the action of 'Out File' is different if a 'save' is done before or after selecting it.
Title: Re: Incorrect default path for 'Out File'
Post by: Dragonfly on August 21, 2014, 16:13:36 pm
Such behavior seems quite logical to me. The path you save a newly created project to becomes the default. And it is remembered when closing CB.
Everyone has his own specific way of organizing things and not everyone places their work in one and the same folder. One may like CAM and .nc files grouped in their own folders, another may like them separated. No program writer is able to please all users.
This only requires a few mouse clicks to direct the new file where appropriate.  A wouldn't call it a bug, neither file it immediately as such in this section.
There are much more important problems to be smoothed along the development path of CB, directly related to the final result and machining - its primary role and goal.
Title: Re: Incorrect default path for 'Out File'
Post by: EddyCurrent on August 21, 2014, 16:59:48 pm
You may be correct but in my view the 'Out File' should default to the same path whenever selected so to me that's an inconsistency and while not stricly a bug, I feel it needs fixing.
I didn't see anywhere mention a priority level below which reports were out of order.
Title: Re: Incorrect default path for 'Out File'
Post by: Jeff_Birt on August 21, 2014, 17:59:00 pm
Almost every program I can think of defaults to opening/saving in the last directory used. Some have a 'project manager' type utility that shows you your folder where you store your projects, lets you create a new project, open an existing project, etc.

For each project I have a folder in Inventor (which I use 99.9% of the time for design). I create a subfolder called 'Toolpath' where I save the DXF/STL files that are used for CamBam and I save the CamBam .cb files and resultant .nc files. There is no 'default' folder to speak of nor would I want to dump every NC file created to the same folder, that would be a big mess.
Title: Re: Incorrect default path for 'Out File'
Post by: EddyCurrent on August 21, 2014, 18:14:02 pm
It seems to be the way in this forum that people fail to understand the crux of what someone is saying, or they make excuses as why things are 'as they are' or they drift off topic. I've worked in engineering and software for more than 40 years and never have I felt so misunderstood. I did work at one place though where the 'experts' knew more about why a job could not be done than they did about how to actually do the job.
Title: Re: Incorrect default path for 'Out File'
Post by: Jeff_Birt on August 21, 2014, 18:23:57 pm
I understand what your saying I'm just not sure it is a bug as it works like every other piece of software out there. If I open Word it does not default to the same directory each time for me to save the file, it will default to the last directory I just used. I'm not trying to argue the point but it seems you are asking for things to work differently than in other software which makes things very confusing. I'm not sure what other software works the way you describe?
Title: Re: Incorrect default path for 'Out File'
Post by: EddyCurrent on August 21, 2014, 18:33:18 pm
I'll give it one more go then.

I open a new project from Template.
At this point I like get my file saved and sorted so I go to 'Out File'. This brings up a browser that defaults to the path set in 'System Path'.
On the other hand if I first go to 'Save as' it brings up a browser that defaults to <DefaultDrawingDirectory> i.e. the folder I want to keep my files in, then if I go to 'Out File' it too defaults to <DefaultDrawingDirectory>

So my point is why does 'Out File' select different paths, should it not select the <DefaultDrawingDirectory> path in both cases becasue that's where I've told it to save my files ?
Title: Re: Incorrect default path for 'Out File'
Post by: Jeff_Birt on August 21, 2014, 18:39:48 pm
Why are you trying to mess with 'Outfile'? You causing yourself extra work for no reason :)

1) Open CamBam
2) Draw a circle on the screen
3) Click the 'Save' icon, navigate to where you want your file saved and save it.
4) Apply a Profile MOP to your circle
5) Generate the GCode, it will 'default' to where you saved your .cb file, save you GCode.
6) Now look at 'Outfile' it is magically filled in for you. It is not something you have to dink with.

Is that what your after?
Title: Re: Incorrect default path for 'Out File'
Post by: Jeff_Birt on August 21, 2014, 18:42:39 pm
Or, are you wanting CamBam to default to a relative directory when generating GCode?

So if your .cb file is in C:\foo, you want CamBam to default to C:\foo\toolpath?

Title: Re: Incorrect default path for 'Out File'
Post by: Jeff_Birt on August 21, 2014, 19:08:36 pm
Or, are you wanting CamBam to default to a relative directory when generating GCode?

So if your .cb file is in C:\foo, you want CamBam to default to C:\foo\toolpath?



Thinking about this some more I'm guessing your meaning a default relative path as above. The only trick there is that CamBam has to know relative to what so it would have to force you to save your file first. Once it knew the file path it would save your GCode relative to that.

I set up Eagle that way so when I generate Gerbers is puts them in ...project\gerbers but if I don't manually create a 'gerbers' folder then it errors out. So to make it work ideally CamBam would need to create the destination folder if it did not exist. That would be handy to be able to be to set that by default, I don't think that is what Andy had in mind for the 'outfile' line but I bet he could make it work.
Title: Re: Incorrect default path for 'Out File'
Post by: Dragonfly on August 21, 2014, 19:15:33 pm
Why are you trying to mess with 'Outfile'? You causing yourself extra work for no reason :)
LLoyd is right about English being native or not, Jeff. Quoting you as this is what I'd have liked to write.
In any other program one does not modify settings or configuration files every time he creates a new file. Save or Save As are for that purpose.
A new unnamed file needs to have a temporary representation somewhere (on the HD). It may be saved or cancelled. If cancelled the temporary file(s) must be cleaned (from a known default location. If saved it obtains all the features of a permanent file with a valid path included.

BTW, Corel products saves and uses two paths - one for where the last file has been opened from and one for where last save operation has been done. After almost 20 years I still sometimes forget this and then need to reopen from the last n-count files list and see where it has gone to. Never even thought about writing to Corel Corp. asking for a change :)
Title: Re: Incorrect default path for 'Out File'
Post by: EddyCurrent on August 21, 2014, 19:21:29 pm
Why are you trying to mess with 'Outfile'? You causing yourself extra work for no reason :)

1) Open CamBam
2) Draw a circle on the screen
3) Click the 'Save' icon, navigate to where you want your file saved and save it.
4) Apply a Profile MOP to your circle
5) Generate the GCode, it will 'default' to where you saved your .cb file, save you GCode.
6) Now look at 'Outfile' it is magically filled in for you. It is not something you have to dink with.

Is that what your after?


It's still not happening but getting there.

First off, I'm not trying to "mess" with 'Out File' it's clearly there as an option to be used.

Yes that's what I'm after but why can't I go to 'Out File' first ?
Why is 'Out File' not magically filled in with my chosen <DefaultDrawingDirectory> BEFORE I've done a 'save' ?
Title: Re: Incorrect default path for 'Out File'
Post by: Jeff_Birt on August 21, 2014, 19:33:32 pm
I 'think' outfile was primarily there so show you where CB is saving stuff when your not prompted to select a path. I have had very few time where I needed to mess with it, I have done some silly copying of files about in a way that has goofed it up and manually edited it to fix it. I suspect I may have originally caused the problem by messing with it I the first place though  ::)

The outfile line is automatically filled out for you when you first save your GCode. I typically will start a new CB project, open any DXF/STL file that will be used and then save the CB file. Then when I get to the point of wanting to generate GCode when I click on 'Generate GCode' it will pop up to the same directory as the CB file I just saved. You can generate the GCode first before saving the CB file but you still have to navigate to the correct directory for saving the CB file. Saving the CB file lets CB know what your working directory is.
Title: Re: Incorrect default path for 'Out File'
Post by: pixelmaker on August 21, 2014, 20:08:51 pm
Eddy,
I don´t know why you open a thread in the Bug Reports.
The fault is that in your temlate is a wrong path or no path, thats all.
Open your template and set in the "Out File" Option in the machining folder the output path.

{$cbfile.name}.nc • if you use this the .nc file is saved at the same place as the cambam file.

If you want always set a special folder e.g. F:\cambam files\, you use F:\cambam files\{$cbfile.name}.nc
then the .nc file is saved in the folder F:\cambam files\ with the name of the saved cambam file.

1.) Save this file in the templates folder in your system folder.
2.) In the configuration from CB you can now choose this template file as a Standard Template.
Every file you open now with "New file" is from this template.
If you work with different template you can make as many templates you want and open it with "New from template."

Because you open a template from the system folder and you have defined no path in this template CB want save it in the system folder.

This is not a bug but a missed basic configuration.

ralf
Title: Re: Incorrect default path for 'Out File'
Post by: EddyCurrent on August 21, 2014, 20:49:03 pm
I already said that if I set the 'Out File' path to 'F:\cambam files' it did not restore that when I reloaded the template.

Here's my template.

<?xml version="1.0" encoding="utf-8"?>
<CADFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="0.9.8.0" Name="Mytemplate">
  <layers>
    <layer name="Default" color="127,255,0">
      <ModificationCount>0</ModificationCount>
      <objects />
    </layer>
  </layers>
  <MachiningOptions>
    <OutFile>F:\cambam files\{$cbfile.name}.nc</OutFile>
    <PostProcessor>Mach3-CutViewer</PostProcessor>
    <Stock>
      <PMin>0,0</PMin>
      <PMax>0,0</PMax>
      <Color>255,165,0</Color>
    </Stock>
    <ToolProfile>Unspecified</ToolProfile>
  </MachiningOptions>
  <parts />
  <ActiveLayer>Default</ActiveLayer>
</CADFile>


When I open it and go to the 'Out File' line it defaults to the 'System Folder' on C:
What I'm saying is, it shoudl go to <OutFile>F:\cambam files\{$cbfile.name}.nc</OutFile>

How many times do I have to say this ?
Title: Re: Incorrect default path for 'Out File'
Post by: lloydsp on August 21, 2014, 20:50:58 pm
Eddy,
Did it turn up blank, or return to some 'default'.  I don't remember.

LLoyd
Title: Re: Incorrect default path for 'Out File'
Post by: EddyCurrent on August 21, 2014, 21:19:34 pm
The field itself was blank but when I clicked into it and open the file browser it went to the default C: drive system folder.
Title: Re: Incorrect default path for 'Out File'
Post by: lloydsp on August 21, 2014, 21:51:57 pm
Ok... I'd say that's a 'feature' that needs 'modifying' in a future version.  It's one thing to assume a default path when none is given, quite another to dispose of a path that's been supplied.

Lloyd
Title: Re: Incorrect default path for 'Out File'
Post by: pixelmaker on August 21, 2014, 23:04:02 pm
Ok we can also stop here. I try to explain you something, but it looks that you don´t read it.
{$cbfile.name} is a macro. It is only filled when the CamBam file is saved first.
If you don´t save the file first at the F drive this macro is not filled and CB will save the file in the templates folder, because the macro is not a valid path.
I made a short video and you can see that it is not a problem with a unsaved Cambam file to save the .nc file to a other drive, just click (http://screencast.com/t/sEnagpv1K)
You see that CamBam saves the nc file on my Y: drive (this is my mac) , without saving the cambam file, if I write a correct path in the out file.

@Lloyd, it works now. If you write in the temlate a valid path like Y:\Desktop\test.nc this path is displayed in the out file and CB wil save the G-Code there. But it can´t work with a macro if you don´t fill the macro.

ralf
Title: Re: Incorrect default path for 'Out File'
Post by: lloydsp on August 22, 2014, 00:06:46 am

@Lloyd, it works now. If you write in the temlate a valid path like Y:\Desktop\test.nc this path is displayed in the out file and CB wil save the G-Code there. But it can´t work with a macro if you don´t fill the macro.
-----------

You have a point, but tell me, why does the rest of the path supplied in the template also disappear?

I do almost entirely "one-offs".  I've only experimented with templates once or twice, and without any joy in the sort of work I do.  But if I supply part of a path in a template, and save that path, why would the whole thing disappear?

It'll be a while before I have the time to experiment, but it seems you both are making valid points.

Lloyd
Title: Re: Incorrect default path for 'Out File'
Post by: Jeff_Birt on August 22, 2014, 00:50:01 am
CamBam seems to ignore what ever is in the outfile tags of the template. When you do a New-> From Template the system folder becomes the working directory because that is where you loaded the template from. So when you then click on 'outfile' after loading the template that is where it defaults to. CamBam ignores anything saved in the template in the outfile tags at least if it is a relative path, I did not try a fixed path. Even if CamBam did not ignore the relative path you would first have to save your CB file to the correct directory so CamBam knew what the outfile path was relative to.
Title: Re: Incorrect default path for 'Out File'
Post by: EddyCurrent on August 22, 2014, 07:46:03 am
pixelmaker, thank you for your video but that is not really what I'm talking about, I can do that already but I'm saying it's not right, I want a computer to help me, not make me do things manually.
Also I said at the begining it was more a feature than a bug but then decided it was a bug but if admin wants to move this thread to another area that's fine by me.
For the benefit of some, there is no aggresion, demanding, or any other form of coercion, just peace and an explanation of how I think CamBam's file handling could be improved to make everyone's life that little bit easier.

I'm going to summarise what's been said so far in this thread and the other thread (which I have stopped posting in because it's gone pear shaped)

1. I think nobody wants to store their own files in the CamBam System path
2. Most (all ? ) people want to store their .cb files in a path they set themselves
3. Some people want their .nc files to be stored in a different path than the .cb files
4. Most ( all? ) people seem happy that CamBam can use the 'last path used' for subsequent operations
5. I would like to click in the 'Out File' line and see it default to my .nc path.

Does Cambam default to these requirements ? No it does not.

So what does CamBam do now.

1. It provides a dialogue box in 'Options' that allows the user to hard code a System path
2. After a save operation it 'remembers' that path the next time I do a save.
3. If I start a New project it uses the System path to get the Template file
4. If I start a New project and click in the 'Out File' line it defaults to the System path.
5. If I save my .cb file in the path of my choice and then click in the 'Out File' line it goes to my 'last saved .cb/.nc' path. (it defaults to putting my .nc and .cb files in the same path)
6. If I set the 'Out File' path in a template than save that template, CamBam does not repopulate the 'Out File' line upon reloading that template. (which may be fine)

So what am I saying I think Cambam should be doing.

1. Cambam should 'remember' three paths, System, .cb files, .nc files. This could be done with three variables in the .config file. Currently there is only one, <DefaultDrawingDirectory>
2. If I start a New project it should use the System path (as it does now)
3. If I start a New project and click in the 'Out File' line it should default to the 'last used .nc' path
4. If I do a 'Save as' operation it should go to my 'last used .cb' path.
4. If I save my .cb file in the path of my choice and then click in the 'Out File' line it should go to my 'last saved .nc' path.
5. If I set the 'Out File' path in a template then save that template, CamBam should repopulate the 'Out File' line upon reloading that template, if the line was left blank then CamBam should repopulate it with a blank line but upon clicking in the 'Out File' line it should defualt to my 'last saved .nc' path as in 3. above.

I can't put it any clearer than that, please don't reply with 'workarounds' or 'here's how to do it now' because I already know that.
Title: Re: Incorrect default path for 'Out File'
Post by: Jeff_Birt on August 22, 2014, 13:28:14 pm
EddyCurrent -> I have been playing with this come more and it seems like CB will do what you want except that it completely ignores the outfile tag in the .cb file when you do a New->From Template.

I created a new template and modified the outfile property to 'code\{$cbfile.name}.nc'. If I do a New->From Template the existing outfile tag is completely ignored. If I do an Open then choose the template file it works as expected, i.e. if there is an existing code folder in the current working directory (which is the directory you loaded the template/.cb file from) then the .nc is saved there, otherwise you get a Save dialog.

I created my own 'template' folder under the main folder where I keep all of my projects so it is like:

Projects
 - MyTemplates
 - Project A
 - Project B

Then I did an Open->MyTemplates->template.cb which loaded the template file and retained the information in the outfile tag. When I did a 'Save As' I was then almost in the correct spot, much closer than the system folder anyhow. If you always start a new project by loading the template it will also be toward the top of the recent files list in the File menu as well. I know this is a work around which you did not want but the main point was not the work around but rather discovering that CB does 90% of what you want except it ignores the outfile tag when you do a New->From Template.

So I think to get where you want to go we would need

1) CamBam to not ignore the outfield tag in a template loaded with New->From Template
      1b) and/or be able to specify a default relative path for NC files, i.e. 'code\{$cbfile.name}.nc'
      1c) CamBam should create the sub folder 'code' if it does not exist
2) Ability to specify a default working directly for projects when you start from a template, i.e. 'Projects=F:\MyCambam_Stuff\'

I think with the above changes you could get what you want and it would be generally helpful. If you start from a template or blank/new your default relative path will be retained and the sub-folder created if it does not exist. Also, if starting from a template or blank/new your default working directory will be used. If you open an existing CB file then the working directory is the directory containing that file (which is how every program works.)

So sorry to rehash what you said, I just wanted to make sure I understood and report what I found trying out different way to load/use templates.
Title: Re: Incorrect default path for 'Out File'
Post by: EddyCurrent on August 22, 2014, 14:28:07 pm
Jeff,
I thank you very much for taking the time to understand and try out what I was talking about.
What you said in your conclusion is I think correct.
The idea of the template file retaining the 'Out File' path is maybe not required, after all it is a template to be used as a basis for new projects, but the idea that CamBam 'remember' the three file paths, templates, .nc files, .cb files, and that if I click into the 'Out File' line at any time it should go to the '.nc files' path, is I think essential.

Thank you once again.