IF you use that code then of course you stopped the Gcode program with the DoButton(1) and Dobutton(3). IT is not going to restart on its own(;-).
IF you want it to contunue after you have opened the door you have to provide code to do so. Or Create Code to wait on a response like open the door. These piece of code gives you one chance to open the door then ends the program. The Msgbox will prompt you to open the door . IF you do, then press OK then it ends the macro and the G code continues if not then it ENDS the Gcode program and you have to start all over again as the DOOR switch has failed.
If NOT Isactive(signal1) then 'The Door Open statement was just an example of you calling the state of the Door Switch it is NOT real code to be used
MsgBox" Door Not Open, Please Close To Continue or ELSE program will stop"
End IF
If NOT Isactive(signal1) Then
Message" G Code Program has ENDED due to Door ERROR. CHECK door switch "
DoButton(3)
End
End IF
THERE ARE many ways to do this you just have to pick a method then follow up with the correct macro code.
Just a thought, (;-) TP