Gremlin Refresh or Reload Needed

More
25 Jan 2017 23:30 #86661 by Ivan_The_Red
I'm finishing up a GUI modification to Gscreen and all is great but I cant find out how to "refresh" or "redraw" the Gremlin screen. If a program is loaded without block delete activated then I enable block delete, my screen does not show the resultant tool path. The only way I can get the tool path to update and show the "block deleted" version is to load an "empty" file or another file then reload the file I'm trying to run. Is there a command for Gremlin to accomplish this ? Another approach I can try is to obtain the currently loaded file name ( which I would need help to figure out also ) then write code to load the empty file then reload the file which then does show the updated tool path.

Any help is always greatly appreciated.

Thanks

Jeff

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

More
26 Jan 2017 05:07 #86684 by cmorley
There is a function in gscreen for this -as long as your glade file still has the default VCP action reload in it:
self.gscreen.reload()

or you could add a VCP action reload widget to the GLADE file and then call:
self.widgets.name_of_action_reload_widget.emit('activate')
[normally in gscreen the reload action is called hal_action_reload so:
self.widgets.hal_action_reload.emit("activate") ]

or you could call the graphic plotter (hal_gremlin widget) directly:
self.widgets.name_of_hal_gremlin.reloadfile(None)
[normally in gscreen this widget id called gremlin so:
self.widgets.gremlin.reloadfile(None) ]

Chris M

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

More
26 Jan 2017 11:36 #86699 by Ivan_The_Red
Hi Chris ,
Thanks again for your continued support , thats exactly what i was looking for. Ill try and address the widget directly
Have a great day
Jeff

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

More
04 May 2017 11:22 #92627 by fupeama
HI all,
is it possible call gremlin.reloadfile from embeded tab?
for example...
EMBED_TAB_LOCATION = notebook_main
EMBED_TAB_COMMAND = gladevcp -c psm-xy81 -u psm-xy81.py -x {XID} psm-xy81.glade

I need call self.widgets.gremlin.reloadfile(None) from psm-xy81.py ?

Thanks
Martin

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

Time to create page: 0.105 seconds
Powered by Kunena Forum