new file button - dont work

More
17 Jul 2021 18:25 #215162 by zz912
I have LinuxCNC 2.8.2. If I click on "new file" button, it dont work.
 

Python is not my friend. Could you help me?
# make a new file
    def on_btn_new_clicked(self, widget, data=None):
        tempfilename = os.path.join(_TEMPDIR, "temp.ngc")
        content = self.get_ini_info.get_RS274_start_code()
        if content == None:
            content = " "
        content += "\n\n\n\nM2"
        gcodefile = open(tempfilename, "w")
        gcodefile.write(content)
        gcodefile.close()
        if self.widgets.lbl_program.get_label() == tempfilename:
            self.widgets.hal_action_reload.emit("activate")
        else:
            self.widgets.hal_action_open.load_file(tempfilename)
            # self.command.program_open(tempfilename)
        self.widgets.gcode_view.grab_focus()
        self.widgets.btn_save.set_sensitive(False)

    def on_tbtn_optional_blocks_toggled(self, widget, data=None):
        opt_blocks = widget.get_active()
        self.command.set_block_delete(opt_blocks)
        self.prefs.putpref("blockdel", opt_blocks)
        self.widgets.hal_action_reload.emit("activate")
Attachments:

Please Log in or Create an account to join the conversation.

More
22 Jul 2021 09:03 #215556 by zz912
Replied by zz912 on topic new file button - dont work
Nobody knows? Am I the only one who has this problem?

Please Log in or Create an account to join the conversation.

More
29 Jul 2021 21:37 #216276 by andypugh
I suspect that only Norbert will have the answer.

And he hasn't been on the forum for quite some time:
forum.linuxcnc.org/cb-profile/newbynobi

Please Log in or Create an account to join the conversation.

More
30 Jul 2021 20:48 #216398 by newbynobi
Do you have an RS274 start code in your INI File?
If not try to add any code, i.e. G54 and report back.

Norbert
The following user(s) said Thank You: HalaszAttila, zz912

Please Log in or Create an account to join the conversation.

More
30 Jul 2021 21:34 #216400 by HalaszAttila
Hello,
i tested with a RS274_STARTUP_CODE = G54, and it solve the problem. Thanks.

Please Log in or Create an account to join the conversation.

More
01 Aug 2021 12:02 #216597 by zz912
Replied by zz912 on topic new file button - dont work
I added RS274_STARTUP_CODE = G54 and this not helped me.
Attachments:

Please Log in or Create an account to join the conversation.

More
01 Aug 2021 14:14 #216604 by zz912
Replied by zz912 on topic new file button - dont work
RS274_STARTUP_CODE = G54 - it is probably wrong
RS274NGC_STARTUP_CODE = G54 - it should be better

I'll try and let you know.

linuxcnc.org/docs/2.5/html/config/ini_co...sub:RS274NGC-section

Please Log in or Create an account to join the conversation.

More
02 Aug 2021 15:22 - 02 Aug 2021 15:23 #216706 by zz912
Replied by zz912 on topic new file button - dont work
[RS274NGC]
RS274NGC_STARTUP_CODE = G90

It solved my problem.Thank you for help.
Last edit: 02 Aug 2021 15:23 by zz912.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

Moderators: newbynobi
Time to create page: 0.142 seconds
Powered by Kunena Forum