Hello Guest it is April 25, 2024, 08:51:33 PM

Author Topic: Redraw toolpath  (Read 6797 times)

0 Members and 1 Guest are viewing this topic.

Redraw toolpath
« on: January 23, 2016, 02:26:53 PM »
I hope you guys dont get pi$$ed at all of the questions, I try to search the forums and figure it out myself before I ask!  ::)

I added a button to show or hide the table boundarys, I wanted it to regen after, used the do button 160 code (same code the regen button does),
cant get it to work...

value = GetParam("Boundry")
if  value = 1 then
  SetParam "Boundry" , 0
Else
SetParam "Boundry" , 1
End If
dobutton(160)
Re: Redraw toolpath
« Reply #1 on: January 23, 2016, 03:03:52 PM »
You already have the buttons on the screens that doo what you seem to be describing.
Could you just use them ?
Or, duplicate them if on a custom screen?

Russ
 :)
Re: Redraw toolpath
« Reply #2 on: January 23, 2016, 03:27:21 PM »
I duplicated them, just trying to get one button to change AND regen the toolpath...I got the idea from a youtube mach help video...the person had one button that redrew the toolpath window whne he changed the toolpath to show the table limits....

My two buttons work like the 1024 set, jsut trying to make if one button? DOnt know why the last line (dobutton(160)) is not working...

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Redraw toolpath
« Reply #3 on: January 23, 2016, 03:38:33 PM »
Try adding a delay before the regen, like maybe sleep(1000)
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Redraw toolpath
« Reply #4 on: January 23, 2016, 04:09:26 PM »
Tried it, no change...

value = GetParam("Boundry")
if  value = 1 then
  SetParam "Boundry" , 0
Else
SetParam "Boundry" , 1
End If
sleep(1000)
dobutton(160)

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Redraw toolpath
« Reply #5 on: January 23, 2016, 04:23:20 PM »
It should be
DoOemButton rather than just DoButton.
Hood
Re: Redraw toolpath
« Reply #6 on: January 23, 2016, 04:44:14 PM »
I duplicated them, just trying to get one button to change AND regen the toolpath...

Ah, sorry , overlooked that part.  :P

Hood's fix worked here, seems no need for the sleep then either.

Nice addition to my screen as well.
Thanks leversole,  :)
Russ
Re: Redraw toolpath
« Reply #7 on: January 23, 2016, 04:52:30 PM »
It should be
DoOemButton rather than just DoButton.
Hood

Cool! Was looking thru the VB wiki and saw OEMButton, figured I would try it and it worked! I came back here to let everyone know, and saw your post! Also removed the sleep as not needed!

Thanks ALL

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Redraw toolpath
« Reply #8 on: January 23, 2016, 04:59:26 PM »
The search can be a PITA if you don't really know what exact search words to use for the problem you face.
If you did a search for DoOemButton(160) I suspect you would come up with a post or two from years ago.
Problem is however knowing the DoOemButton(160) would likely mean you don't need to search :D


Hood
Re: Redraw toolpath
« Reply #9 on: January 23, 2016, 05:01:00 PM »
You are right! I guess experience is the BEST teacher! It is good though tath others can learn and spark new ideas from other's exchanges!