I've been messing with the Stackumup macro on and off all day. Even this version I messed with works perfectly from the editor. But when run from the button it drops the Cdown to 0 and only makes 1 part.
'Macro M3007 Auto Batch Load Horizonal
Dim fname As String
Dim Cuts As Single
Dim Xext As Double
Dim Yext As Double
Dim Test As String
Dim Cdown As Single
Sub Main()
Test = ("No File Loaded.")
Fname = FileName()
While Ismoving()
Wend
Message"" &Fname
While Ismoving()
Wend
If Fname = Test Then
MsgBox("No File Loaded, PLEASE LOAD FILE and RESTART")
End
End If
Cuts = Question("How Many Horizonal Parts UP TO 10 ?")
If Cuts >10 Or Cuts <1 Then
MsgBox(" Number Out Of Range 1-10 Retry Again ")
End
End If
Cdown = Cuts
SetUserDro(2010,Cdown)
N1:
RunFile()
While Ismoving()
Wend
Message" Parts to Go: "& Cdown
Xext= GetOemDro(10)
While Ismoving()
Wend
Yext= GetOemDro(5)
While Ismoving()
Wend
Code" G0 Z1.00"
While IsMoving()
Wend
Code"X" & (Xext + .250)
While Ismoving()
Wend
Code"Y"& Yext
While IsMoving()
Wend
DoButton(9)
While Ismoving()
Wend
DoButton(

While Ismoving()
Wend
Cdown=(Cdown-1)
If Cdown >= 1 Then
SetUserDro(2010,Cdown)
While Ismoving()
Wend
GoTo N1
ElseIf Cdown=0 Then
Message("End Of Batch Load")
End
End If
End Sub
What do you make of that?
Auto scale looks really nice. Play time. LOL
GL