File name question / loading toolsets / Job Report question

Having problems with or questions about SheetCam? Post them here.
Post Reply
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

File name question / loading toolsets / Job Report question

Post by David_Lelen01 »

Hey Les,

Would it be possible to add something in sheetcam so that when a file is named by a number, it will automatically default to the next number in sequence when writing a post. Our laser for some reason has to have the file name as an 8-digit number. If i name a file 4367.nc, can the next time i go to write the post default to 4368.nc? Or is that very complicated?

Also, would it be possible to add a picture of the parts to the job report instead of having to print it separately?

And again also, wanted to remind you about possibly adding the ability to specify a toolset to load when a machine is loaded.

Also, i know you have said the "OnOffset" functions were not fully developed and probably wont be, but i just wanted to let you know as far as i can see they work perfectly fine unless any path rules are active. Including the "Start at center of circles smaller than".

Thanks.
User avatar
Les Newell
Site Admin
Posts: 3665
Joined: Thu May 11, 2006 8:12 pm

Re: File name question / loading toolsets / Job Report question

Post by Les Newell »

David_Lelen01 wrote: Thu Sep 19, 2019 6:02 pmWould it be possible to add something in sheetcam so that when a file is named by a number, it will automatically default to the next number in sequence when writing a post. Our laser for some reason has to have the file name as an 8-digit number. If i name a file 4367.nc, can the next time i go to write the post default to 4368.nc? Or is that very complicated?
You can - sort of. The event 'OnFileOpen' is called before the output file is created. At that point you can change the fileName and filePath variables to override the user-selected file name. You can either look through the output directory to find the lowest number unused file name or keep track of the number in SheetCam's settings file. Here is an example of how you could store a number in the settings:

Code: Select all

local cfg = wx.wxConfigBase:Get()
local found
local num
found,num = cfg:Read("/post/fileNumber", 1000)
num = num + 1
cfg:Write("/post/fileNumber", num)
Also, would it be possible to add a picture of the parts to the job report instead of having to print it separately?
I'll need to look into that one.
Also, i know you have said the "OnOffset" functions were not fully developed and probably wont be, but i just wanted to let you know as far as i can see they work perfectly fine unless any path rules are active. Including the "Start at center of circles smaller than".
I'm not sure why rules affect OnOffset. I need to look into that one.
User avatar
Les Newell
Site Admin
Posts: 3665
Joined: Thu May 11, 2006 8:12 pm

Re: File name question / loading toolsets / Job Report question

Post by Les Newell »

OK, I found the path rules problem. It's fixed for the next release. By the way, only rules that affect the start of the cut cause a problem.
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: File name question / loading toolsets / Job Report question

Post by David_Lelen01 »

OK, I found the path rules problem. It's fixed for the next release. By the way, only rules that affect the start of the cut cause a problem.
That is probably true. The only place i was using the offset functions was at the start of a cut path.
You can - sort of. The event 'OnFileOpen' is called before the output file is created. At that point you can change the fileName and filePath variables to override the user-selected file name. You can either look through the output directory to find the lowest number unused file name or keep track of the number in SheetCam's settings file. Here is an example of how you could store a number in the settings:
Sheetcam threw me an error when i tried putting your code in the post. If this works, is it going to automatically override whatever the user types in the file save dialog? I only want the save dialog to default to the next number in sequence but still allow the user to type something different if desired. This is what i put in the post:

Code: Select all

function OnFileOpen()
	local cfg = wx.wxConfigBase:Get()
	local found
	local num
	found,num = cfg:Read("/post/fileNumber", 1000)
	num = num + 1
	cfg:Write("/post/fileNumber", num)
	fileName = num
end
And this is the error:
Error.JPG
Error.JPG (38.09 KiB) Viewed 1411 times
Also, I wanted to remind you about possibly adding the ability to specify a toolset to load when a machine is loaded. Not sure if you saw that mentioned earlier.
User avatar
Les Newell
Site Admin
Posts: 3665
Joined: Thu May 11, 2006 8:12 pm

Re: File name question / loading toolsets / Job Report question

Post by Les Newell »

Sorry, its wx.wxConfigBase.Get(false). I keep getting caught out by when you need a . and when you need a :

I need to think on linking tool sets to machines.
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: File name question / loading toolsets / Job Report question

Post by David_Lelen01 »

Sorry, its wx.wxConfigBase.Get(false). I keep getting caught out by when you need a . and when you need a :
Ok, that process doesnt do what i was looking for so oh well. That just forces the file name. I was looking for a default to pop up in the save as dialog but still use whatever is typed in.
I need to think on linking tool sets to machines.
Ok, thanks for thinking about it. It sure would be nice for us though. I definitely need to send you a care package or something for everything you have done for us.
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: File name question / loading toolsets / Job Report question

Post by David_Lelen01 »

Les, i know you said you would have to think on this some, but i was just wondering if you were considering adding a picture of the job extents to the reports? I just think it would be really nice for our operators to see what it is they are cutting before they load everything up. And that way if we're looking for a specific job we can thumb through papers instead of codes on the machine.

And this is probably asking way too much, but i think it would be nice too to be able to put a picture of each part in the parts section of the report. Then the overall job picture in a job section.
Post Reply