Re: Need to figure out were i went wrong
Originally Posted by
woffler
Hi all i am trying to modify this little bit of code on my post and it keeps throwing a error , i sure could use some help with this it starts after Lathe return string (G99), iwas trying insert the G96 code .
I am not sure what i should have put after the G99 ? and then how to end it ?
If MILL_GetUserSelectComboVariable(0) = 0 Then
Lathe_SetReturnString("G98")
Else
Lathe_SetReturnString("G99")
Then
Lathe_SetReturnString("G96")
End If
Thank You in advance
Hello,
you have a programiing error. You cannot use your code.
Correct can be this.
If MILL_GetUserSelectComboVariable(0) = 0 Then
Lathe_SetReturnString("G98")
Elseif MILL_GetUserSelectComboVariable(0) = 1 then
Lathe_SetReturnString("G99")
else
Lathe_SetReturnString("G96")
End If
but it is also not good. Not sure what is your all code. It is only example.
You cannot use
If some_variable = true then
"do something"
else (in this line you say if "some_variable = true" do someting else)
"do something else"
then (it is syntax error)
endif
Hope understable
Marek
Alphacam post and VBA macros, Autodesk HSM post.
www.cadcam-softcz.cz