new file button - dont work
- zz912
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 535
- Thank you received: 85
17 Jul 2021 18:25 #215162
by zz912
new file button - dont work was created 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?
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.
- zz912
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 535
- Thank you received: 85
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.
- andypugh
-
- Away
- Moderator
-
Less
More
- Posts: 23315
- Thank you received: 4944
29 Jul 2021 21:37 #216276
by andypugh
Replied by andypugh on topic new file button - dont work
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
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.
- newbynobi
-
- Offline
- Moderator
-
Less
More
- Posts: 2081
- Thank you received: 413
30 Jul 2021 20:48 #216398
by newbynobi
Replied by newbynobi on topic new file button - dont work
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
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.
- HalaszAttila
- Offline
- Premium Member
-
Less
More
- Posts: 147
- Thank you received: 5
30 Jul 2021 21:34 #216400
by HalaszAttila
Replied by HalaszAttila on topic new file button - dont work
Hello,
i tested with a RS274_STARTUP_CODE = G54, and it solve the problem. Thanks.
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.
- zz912
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 535
- Thank you received: 85
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.
Please Log in or Create an account to join the conversation.
- zz912
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 535
- Thank you received: 85
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
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.
- zz912
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 535
- Thank you received: 85
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.
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, HansU
Time to create page: 0.129 seconds