Default tools textfile querie
Posted: Sat Sep 02, 2017 9:07 am
Hi Les,
I'm doing a little programming that involves reading (only reading) the default tools text file "Default.tools" in the appdata folder.
Here's a simple tool file containing 2 tools:
[Tool0]
Type=PlasmaTool
Name=Steel 3mm Finecut @ 45A
Comment=
Tool\ number=7
Kerf\ width=1.5
Plunge\ rate=3810
Pierce\ delay=0.5
Pause\ at\ end\ of\ cut=0
Wiggle\ length=10
Pierce\ height=3.81
Cut\ height=1.524
Pierce\ type=0
Feed\ rate=2540
[Tool1]
Type=PlasmaTool
Name=Steel 5mm 45A nozzle
Comment=
Tool\ number=8
Kerf\ width=1.5
Plunge\ rate=3810
Pierce\ delay=0.5
Pause\ at\ end\ of\ cut=0
Wiggle\ length=10
Pierce\ height=3.8
Cut\ height=1.5
Pierce\ type=0
Feed\ rate=1500
I'm looking at reading this file in a sequential manner, i.e. I'm EXPECTING the sequence will always be:
[ToolX]
Type=
Name=
Comment=
etc, etc.
My program is only interested in plasma tools and will ignore any other tools. Will Sheetcam ever change the ordering of lines in a plasma tool, OR would any extra lines ever get added into a plasma tool by Sheetcam.
I could always test each line for "[ToolX]" but after that point I'm basically wondering if I have to test each line for "Type=", "Name=", etc or can I rely on the fixed sequence of the lines to always be the same.
Thanks,
Keith.
I'm doing a little programming that involves reading (only reading) the default tools text file "Default.tools" in the appdata folder.
Here's a simple tool file containing 2 tools:
[Tool0]
Type=PlasmaTool
Name=Steel 3mm Finecut @ 45A
Comment=
Tool\ number=7
Kerf\ width=1.5
Plunge\ rate=3810
Pierce\ delay=0.5
Pause\ at\ end\ of\ cut=0
Wiggle\ length=10
Pierce\ height=3.81
Cut\ height=1.524
Pierce\ type=0
Feed\ rate=2540
[Tool1]
Type=PlasmaTool
Name=Steel 5mm 45A nozzle
Comment=
Tool\ number=8
Kerf\ width=1.5
Plunge\ rate=3810
Pierce\ delay=0.5
Pause\ at\ end\ of\ cut=0
Wiggle\ length=10
Pierce\ height=3.8
Cut\ height=1.5
Pierce\ type=0
Feed\ rate=1500
I'm looking at reading this file in a sequential manner, i.e. I'm EXPECTING the sequence will always be:
[ToolX]
Type=
Name=
Comment=
etc, etc.
My program is only interested in plasma tools and will ignore any other tools. Will Sheetcam ever change the ordering of lines in a plasma tool, OR would any extra lines ever get added into a plasma tool by Sheetcam.
I could always test each line for "[ToolX]" but after that point I'm basically wondering if I have to test each line for "Type=", "Name=", etc or can I rely on the fixed sequence of the lines to always be the same.
Thanks,
Keith.