I wanted a callback that only triggers when user switch from one view to other.
but since i couldn’t find something like that,
I coded something like this ;
global before_av= viewport.activeViewport
fn viewport_swtich_trigger= (
curent_av=viewport.activeViewport
if before_av != curent_av then (
completeRedraw()***
before_av=viewport.activeViewport
)
)
callbacks.addScript #viewportChange “viewport_swtich_trigger()” id:#ViweSwtcd
Since i wonder this will slow down the view ports,
is there a better way of doing this?
*** - (actually what im trying to do is clear a text generated on view port using gw commands; when i switch frm one view to another. )
