need help with gscreen

More
09 May 2022 22:53 - 09 May 2022 22:53 #242419 by thadwald
Hi
I am working on a custom gscreen gui. I cannot figure out how to open a gcode file programmatically. Actually, what I would like to do is simply store the current file upon exit, then reload it when LCNC starts. I am able to store the current file but I cannot seem to open a new one. 

I am a complete newbie to python, so any help will be appreciated. Pointers to working code examples or programming manuals would be particularly helpful.

Thanks
Last edit: 09 May 2022 22:53 by thadwald.

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

More
09 May 2022 23:15 #242421 by tommylight
Replied by tommylight on topic need help with gscreen
[DISPLAY]

OPEN_FILE = cncbytoma.ngc
Add the file name in the display section of the .ini file, file must be in the config folder, or add the full path to it.
Not sure if it works on GScreen though.

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

More
09 May 2022 23:40 #242429 by thadwald
Replied by thadwald on topic need help with gscreen
Unfortunately for me, gscreen does not appear to support OPEN_FILE ...

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

More
10 May 2022 01:14 #242448 by thadwald
Replied by thadwald on topic need help with gscreen
I learned how to do this by looking at gmoccapy.py. Thanks!

You use the HAL widgets:
self.widgets.vcp_filechooser.set_filename(file)
self.widgets.vcp_action_open.load_file(file)
The following user(s) said Thank You: tommylight

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

Time to create page: 0.216 seconds
Powered by Kunena Forum