ToolClass name for a Flame tool

Having problems with or questions about SheetCam? Post them here.
Post Reply
rrc1962
Posts: 141
Joined: Sun Jan 17, 2010 4:55 pm

ToolClass name for a Flame tool

Post by rrc1962 »

Les...

Whats the toolclass name for a flame tool. Couldn't find any mention of toolclasses anywhere in the manual. I tried "Flame" and "FlameTool" with no luck.

Thanks
rrc1962
Posts: 141
Joined: Sun Jan 17, 2010 4:55 pm

Re: ToolClass name for a Flame tool

Post by rrc1962 »

rrc1962 wrote:Les...

Whats the toolclass name for a flame tool. Couldn't find any mention of toolclasses anywhere in the manual. I tried "Flame" and "FlameTool" with no luck.

Thanks
FlameTool ended up working. Must have had a typo the first time.

Another question though. If there a variable to determine the operation type? Not the operation name, but the type. The name contains a concatenated string with operation type, layer name and tool name. All I need it the operation type.
User avatar
Les Newell
Site Admin
Posts: 3669
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

You can use operationClass just like toolClass.

By the way the debugger can be useful for finding variables. Set a breakpoint somewhere in your code (click on the darker leftmost column in the editor). Now when you run the post it will stop on the breakpoint and show the post editor and variable monitor. You can browse though all of the global and local variables at that point. There are buttons on the editor toolbar to single step and continue. Note that this only works on recent releases of SheetCam.
rrc1962
Posts: 141
Joined: Sun Jan 17, 2010 4:55 pm

Post by rrc1962 »

Cool, Thanks. I've almost got it. I defined a variable in the post which shows up under "V" in operations. The operator sets the variable and everything works great. The problem occurs when the user does not set the variable. The post throws a "comparing to nil" error.

Is there a way to default the variable to a value of zero unless the operator sets it otherwise?
User avatar
Les Newell
Site Admin
Posts: 3669
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

Set the variable to 0 in function OnInit(). If your variable is defined by the user it will override that default value.
rrc1962
Posts: 141
Joined: Sun Jan 17, 2010 4:55 pm

Post by rrc1962 »

Cool...That's working great now.

One more question though. I see that I can declare a variable as type text. Is there a way to make choices available to the user in the operation variable dialog? Lets say you have a variable called "SPINDLE" and you want the two options to be "ON" and "OFF". Rather than the user having to type in the text (and possibly make a typo), is there a way to make those two options appear in a drop down? Right now I'm just setting the variable to 0 or 1, which works. It's just not as user friendly as "ON" and "OFF".

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

Post by Les Newell »

Unfortunately you can't do that at the moment. Due to the way post variables are stored it isn't very easy to change.
Post Reply