Editing Setup Sheet in Cut2D Pro

The Gallery is for posting photographs and images of work machined using Cut2D
Midd13
Posts: 2
Joined: Tue Jan 31, 2017 11:07 pm
Model of CNC Machine: Genesis Evo 612

Editing Setup Sheet in Cut2D Pro

Post by Midd13 »

Hi, I'm just trying to edit the gagdet for the setup sheet in order to remove the header and footer from the sheet as all I want to print out is the job layout. When you just choose the job layout option in Cut2D the setup sheet still has a big header and footer which make the actual job layout image quite small when you try to print it. I want the whole A4 page to be filled with the job layout image. I was wondering if anyone had any luck in editing the lua code? When I have done this it seems to have no affect and to just be using the default code and completely bypassing my edits.
Any suggestions would be welcome, thank you.

Midd13
Posts: 2
Joined: Tue Jan 31, 2017 11:07 pm
Model of CNC Machine: Genesis Evo 612

Re: Editing Setup Sheet in Cut2D Pro

Post by Midd13 »

I emailed someone at Vectric support and they gave me this information which I was able to use to easily edit the code once I found out which file to edit.
This is what they said to me if anyone wants to know:
'If you have used the "Gadgets > Setup Sheet Editor" this will have placed a copy of
the script to "C:\Users\Public\Documents\Vectric Files\Gadgets\Cut2D Pro V8.5__Setup_Sheet"
(If the software was installed with default settings on most versions of Windows).
The file will be named "Setup_Sheet.lua"
It is our recommendation that the "Public Documents" copy of the script be edited,
so that the main script can be restored at a later date, if required.'

User avatar
Rcnewcomb
Vectric Archimage
Posts: 5864
Joined: Fri Nov 04, 2005 5:54 am
Model of CNC Machine: 24x36 GCnC/WinCNC with ATC
Location: San Jose, California, USA
Contact:

Re: Editing Setup Sheet in Cut2D Pro

Post by Rcnewcomb »

Thanks for posting the follow-up information.
- Randall Newcomb
10 fingers in, 10 fingers out, another good day in the shop

KMD
Posts: 15
Joined: Sun Oct 19, 2014 8:49 pm
Model of CNC Machine: 3 axis Router

Re: Editing Setup Sheet in Cut2D Pro

Post by KMD »

I would like to have exactly what is posted above but don't understand programing code. Can someone walk me throught the changes? or help in any way

Kayvon
Vectric Apprentice
Posts: 75
Joined: Wed Feb 15, 2017 5:29 pm
Model of CNC Machine: CNC Shark

Re: Editing Setup Sheet in Cut2D Pro

Post by Kayvon »

KMD, have a crack at it first. Save off a copy of the files, then try editing them. You'd be surprised how easy some of it is to follow with a few minutes of reading. From there, deleting lines is easy (it's not like you need to compose new code). And if you mess up, it's easy to restore the backups you created.

If you're still stuck after that, we can walk you through which segments to modify.

KMD
Posts: 15
Joined: Sun Oct 19, 2014 8:49 pm
Model of CNC Machine: 3 axis Router

Re: Editing Setup Sheet in Cut2D Pro

Post by KMD »

Kayvon wrote:KMD, have a crack at it first. Save off a copy of the files, then try editing them. You'd be surprised how easy some of it is to follow with a few minutes of reading. From there, deleting lines is easy (it's not like you need to compose new code). And if you mess up, it's easy to restore the backups you created.

If you're still stuck after that, we can walk you through which segments to modify.


Thanks I have been Trying I have got the photo to move around left right and deleted the foot and header. But still end up with the same size photo. its like there is a box around it and it won't resize. Im sure Its some thing simple that Im not doing or doing wrong.
I think Im followwing the text right Im removeing the header in the bottom of code. the upper portion of it seems to collect the data

any help would be nice Thanks

User avatar
adze_cnc
Vectric Wizard
Posts: 4303
Joined: Sat Jul 27, 2013 10:08 pm
Model of CNC Machine: AXYZ 4008
Location: Vancouver, BC, Canada

Re: Editing Setup Sheet in Cut2D Pro

Post by adze_cnc »

KMD wrote:But still end up with the same size photo. its like there is a box around it and it won't resize.
Go to (approximately) line 263 in the Setup_Sheet.lua file and find:

Code: Select all

--search for width attributes in svg and replace with fixed width for setup sheet
   svg = svg:gsub([[width="(.-)"]],[[width="8cm"]])
--search for height attributes in svg and replace with fixed height for setup sheet
   svg = svg:gsub([[height="(.-)"]],[[height="4cm"]])
Changing the 8cm and 4cm (keep the same aspect ratio) is a place to start. Changing them to 12cm & 6cm looks good. It could be made a bit larger but you'd have to figure how to move the SVG file within it's "Job Layout" box (i.e. alter internal indent value).

Steven

Kayvon
Vectric Apprentice
Posts: 75
Joined: Wed Feb 15, 2017 5:29 pm
Model of CNC Machine: CNC Shark

Re: Editing Setup Sheet in Cut2D Pro

Post by Kayvon »

KMD wrote:I have got the photo to move around left right and deleted the foot and header.
That's a solid start! If Adze's suggestion doesn't fix it for you, post back here and I'll try to duplicate what you've done.

KMD
Posts: 15
Joined: Sun Oct 19, 2014 8:49 pm
Model of CNC Machine: 3 axis Router

Re: Editing Setup Sheet in Cut2D Pro

Post by KMD »

Capture.PNG
Im so close but frustrated. i can't get it to move right and some how I made the jobe title shink and become unreadable.

Can anyone point out the errors in my ways

Kayvon
Vectric Apprentice
Posts: 75
Joined: Wed Feb 15, 2017 5:29 pm
Model of CNC Machine: CNC Shark

Re: Editing Setup Sheet in Cut2D Pro

Post by Kayvon »

Would you mind posting the gadget files you have so far? I'll take a look at them this evening.

KMD
Posts: 15
Joined: Sun Oct 19, 2014 8:49 pm
Model of CNC Machine: 3 axis Router

Re: Editing Setup Sheet in Cut2D Pro

Post by KMD »

Kayvon wrote:Would you mind posting the gadget files you have so far? I'll take a look at them this evening.
it wont allow me to attach the .lua file.

User avatar
Rcnewcomb
Vectric Archimage
Posts: 5864
Joined: Fri Nov 04, 2005 5:54 am
Model of CNC Machine: 24x36 GCnC/WinCNC with ATC
Location: San Jose, California, USA
Contact:

Re: Editing Setup Sheet in Cut2D Pro

Post by Rcnewcomb »

it won't allow me to attach the .lua file.
In Windows right-click on the .lua file and choose Send To/Compressed (zipped) folder
You can then upload the .zip file
- Randall Newcomb
10 fingers in, 10 fingers out, another good day in the shop

KMD
Posts: 15
Joined: Sun Oct 19, 2014 8:49 pm
Model of CNC Machine: 3 axis Router

Re: Editing Setup Sheet in Cut2D Pro

Post by KMD »

There was a time in my life I could make a computer do stuff. as I age Im struggling with it all.

I really appreciate everyone's help here is the file

If its possible I would like to get the sheet to fill the whole page. those little letters you see are the part numbers I need. But can't read.
Attachments
Setup_Sheet.zip
(34.9 KiB) Downloaded 321 times

Kayvon
Vectric Apprentice
Posts: 75
Joined: Wed Feb 15, 2017 5:29 pm
Model of CNC Machine: CNC Shark

Re: Editing Setup Sheet in Cut2D Pro

Post by Kayvon »

I just saw the upload this morning. Give me some time and I'll get back to you.

KMD
Posts: 15
Joined: Sun Oct 19, 2014 8:49 pm
Model of CNC Machine: 3 axis Router

Re: Editing Setup Sheet in Cut2D Pro

Post by KMD »

Kayvon wrote:I just saw the upload this morning. Give me some time and I'll get back to you.
Thanks I forgot to link it to your post. The help is great !!!!!!!!!!

Post Reply