PDA

View Full Version : Using Custom Cuts for File Management



beacon14
09-18-2004, 07:35 PM
So, I've been thinking about what I believe to be a common source of frustration - having to manually add lines at the beginning and end of files generated by PartWizard to do routine things such as turn the router on and off; set speeds, cutter diameters and other variables; etc, and an idea occurs to me.

Why not create a "master file" that has all those lines that we have to add at the beginning of each file (we all know that 90 percent of our files require the same leading lines), then has an input sequence asking for the file that we want to cut, then after executing the desired file as a subroutine, ends with the few lines we always put at the end of the file. We can save this master file as a custom cut, so we can start any file with 2 (or possibly 3 or 4) keystrokes. We could even have different Custom Cuts, for calling files using various speeds and other parameters - this would make it possible to have one Custom Cut file for MDF, another for aluminum, another for foam, etc, regardless of the actual toolpath. If we tweak our cutting speeds, plunge depths, etc, we would need to change only the master file, not each individual cutting file.

The sticking point in my mind is how to easily specify a file as part of an input statement. As far as I know, it would require typing in the exact directory/filename path as the input. So, my question is, is there any way to enable the Windows standard file selection window during an input statement, so we could use the mouse to select the directory (if necessary) and the file we want to run?

If the answer is no, I guess I will have to re-post this in the "Suggestions for future ShopBots and Software" category.

Anyone have any input as to why this would be a good or not-so-good idea? It seems like it could eliminate a repetitive but necessary task. I seem to remember hearing that future versions of PartWizard will automatically insert some of these lines, but there are other lines I use almost as a rule, such as a jog to an out of the way location at the end of the file so I can access my workpiece, that I will still have to insert manually.

bill.young
09-18-2004, 08:32 PM
Hey David,

You're correct...at the moment there's no way to do what you want to do within the Windows software...open a standard Windows file selection box or a dropdown list of files. They're on the "it would be nice" list and will probably be included eventually, but they're pretty low priority I'm afraid. We've also talked about adding a "programming" toolbar to the ShopBot Editor so that you can easily add commands and the sort of "macros" that you're talking about, but once again it's on the "someday" list.

It sounds like a great idea, though, and it would be pretty easy to write a simple virtual tool sort of thing that did what you want in the meanwhile...let you select the header, select the ShopBot file and select a footer. There are a couple of ways that it might work.

* have it write a file with the header info at the top of the file, then an FP statement calling the desired ShopBot files, and finally writing the footer info.

* Have each header and footer as seperate files and write a new file that calls the header, the ShopBot file, and the footer with 3 FP statements. The advantage to this is that you can change the header or footer info one time and it will be changed everywhere it's been used.

Want to collaborate?
Bill

beacon14
09-18-2004, 09:52 PM
Bill,

Yes, I do.

My concern with each of the methods you suggest is that they would create a second file to go along with each part file processed. I think that would become cumbersome from a file management standpoint after just a few files.

What about using the virtual tool to create a file with the header, the actual text from the part file, and the footer, and overwrite the original file with the resulting file?

It still lacks the advantages of keeping header and footer info all in one place, and being able to run the same part file with different parameters depending on which master file is called, but at least it would automate the manual process that is being done now.

How do we get started?

David B.

bill.young
09-19-2004, 09:29 AM
Hey David,

That's the way that the current Header Writer virtual tool works...by adding comments to the beginning of the file. Maybe the best thing to do is to add this feature to the existing Header Writer. I could add a couple of check-boxes that could be selected if you want a header and/or a footer, with the header and footer info saved in files. You could select which file had the header or footer info that you wanted using either a standard Windows Open box or maybe from a dropdown list if there weren't too many choices.

There are several advantages to doing it this way. One is that much of the work is already done! Another is that the Header Writer checks to see if a header has already been added to the file and lets you delete the old header before adding a new one. That would be especially important if you were adding movement and settings commands...you wouldn't want to make a change but still have the old commands in the file.

Would that work?
Bill

paco
09-19-2004, 10:37 AM
The project is interesting guys!
As for now, the Header writer is saving all the info. as comments only... would be usefull if some info. (cutting parameters, commands) could be saved without '... a little like the "Additionnal notes" of the current Header Writer but without the ' at each line begining...
A part of this info could be write as specific commands like to control output, variables and such, saved as "start setting #1"... Another part could be settings for predefined cutting parameter for different type of materials ; Softwood, hardwood, Acrylic, HDU, Aluminium, etc... and working conditions; specific safe Z, 2D offset, etc... which, the user could save and use later on other occasions... footer info. could be use the same as the first part of the "Header"; typed in specific info., saved for next use... there could be a check box for all of thoses for inputing'em as comments only (') or as commands... I think standard Windows Open box would be better to select the SBP file, but predefined header and footer could be choose from both since they maybe limited in number...? Note that all thoses input info. should be saved for futur use as .sbp or .txt in a specific folder...

What about that?!?!

paco
09-19-2004, 10:38 AM
Would the name "Header writer" be changed from this new usage?

bill.young
09-19-2004, 11:49 AM
I still feel that there are benefits to having the header and footer info saved as sbp files...maybe with a h_ prefix to make them easy to spot like "h_alum_header.sbp"...and calling them with the FP command within the part file. That way if you decide that you really want to cut aluminum at .45 IPS instead of .5, you only have to modify the h_alum_header.sbp file and it will be changed everywhere you used that header.

I don't think there's any need to create a different Header Writer, but just add the ability to add headers and footers if you want to. You could have the option of selecting an already-written header or footer file or maybe have the ShopBot Editor open to write a new one.

Bill

beacon14
09-19-2004, 12:00 PM
OK, I'm embarassed to admit that I just checked out the Header Writer for the first time. I do think this is an easy way to get much of what I was trying to accomplish.

Yes, Bill, if you could add an option to simply copy commands from a "header.sbp" file at the beginning and "footer.sbp" at the end of a part file, it would be a big help.

I also suppose we could just add the command:

FP, HEADER.SBP

at the top of a part file, and keep the necessary set-up commands in the HEADER.SBP file, and the same with the footer. Then we could edit the header and footer files, which would in effect edit all the part files which use them. It would also allow different header and footer files (i.e. HEADMDF.SBP, HEADALUM.SBP) to accomodate different settings. This is a backwards but I guess equally effective way to do what I wanted to do in the first place. In this case, all you would have to add into the Header Writer Virtual Tool would be the ability to name the HEADER and FOOTER .SBP files.

I'm liking this alot
David

paco
09-19-2004, 01:14 PM
I like that too!
So this way we could create/edit AND select header and/or footer command sbp file to add to a cutting file FROM the Header Writer program?

wayneo
09-20-2004, 12:29 PM
Why couldn't you just use an #INCLUDE file, like you do in 'C'? You could also have a library of different header/footer files that could be executed to perform certain tasks or setup for cutting various materials.......

Wayne

srwtlc
09-22-2004, 12:53 AM
While the 'Header Writer' and the ideas here sound like good ones, I think that the programming toolbar for SBedit would be a better solution to most all part file editing/programming. You could have a whole library of headers, footers, and everything in between that can be placed wherever you want. I use Vector for most of my toolpath code generation and use the macro menu to place many special lines/commands into the code before saving it. When I'm not using that I use NoteTab Light (http://www.notetab.com/) instead of SBedit. It's free and you can set up a 'ShopBot' library of as many commands as you can think up. Once those are in your library, you can just double click or drag and drop them into your file. You can make its default file type to be .sbp and if you want several files open at the same time, it has a tabbed style. I set it up as the default file editor in SB3.

If I were using 'Parts Wizard' (or any other program that gives just the facts) for all my toolpaths, NoteTab Light would be would be my choice.

Just my 2 cents