need help with gscreen
- thadwald
- Offline
- Premium Member
- 
				  
		Less
		More
		
			
	
		- Posts: 111
- Thank you received: 10
			
	
						09 May 2022 22:53		 -  09 May 2022 22:53		#242419
		by thadwald
	
	
		
			
	
	
			 		
													
	
				need help with gscreen was created 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
					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.
- tommylight
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 20846
- Thank you received: 7107
			
	
						09 May 2022 23:15				#242421
		by tommylight
	
	
		
			
				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.
					
	
			
			 		
													
	
				Replied by tommylight on topic need help with gscreen			
			[DISPLAY]
OPEN_FILE = cncbytoma.ngcNot sure if it works on GScreen though.
Please Log in or Create an account to join the conversation.
- thadwald
- Offline
- Premium Member
- 
				  
		Less
		More
		
			
	
		- Posts: 111
- Thank you received: 10
			
	
						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.
- thadwald
- Offline
- Premium Member
- 
				  
		Less
		More
		
			
	
		- Posts: 111
- Thank you received: 10
			
	
						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:
			
					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.160 seconds	
