need help with gscreen

More
4 years 5 months ago #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

Please Log in to join the conversation.

More
4 years 5 months ago #242421 by tommylight
Replied by tommylight on topic need help with gscreen
Code:
[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 to join the conversation.

More
4 years 5 months ago #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 to join the conversation.

More
4 years 5 months ago #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:
Code:
self.widgets.vcp_filechooser.set_filename(file) self.widgets.vcp_action_open.load_file(file)

Please Log in to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum