Category: Qtvcp
Hi
I'm going to use Qt Designer for my Display.
In my python handler I have a method as following:
def load_selected_gcode(self):
if self.modenumber_str != "Auto":
self.show_message("Invalid Mode", "Switch to Auto Mode.",0)
return
index = self.w.listGCodeFiles.currentIndex()
file_name = self.model.data(index, QtCore.Qt.DisplayRole)
file_path = os.path.join(self.gcode_directory, file_name)
self.loaded_gcod = file_path
with open(file_path, 'r') as file:
gcode_content = file.read()
self.w.showGCode.setText(gcode_content)
self.command.reset_interpreter()
self.command.program_open(file_path)
self.show_message("Success", "G Code is loaded successfully", 1)
this method loads the g code file content into a QTextEdit Widget named " showGCode" now before self.command.reset_interpreter() command and self.command.program_open(file_path) which load the G Code into linuxcnc, I want to check the gcode file syntax. How can I do it? How do I know if my G Code file is ok.