please help me, I'm desperately seeking a solution to create a button in a layout in order to toggle live link and the refresh the viewframe; the following code apparently does correctly the toggling of the live link but there is no way to make it refreshing the view;
any hint much appreciated!
'''' start of code
theLayout = av.GetActiveDoc
lstGraphics = theLayout.GetGraphics
vFrame = lstGraphics.FindByClass(ViewFrame)
if(vFrame = Nil) then
MsgBox.Warning("no viewframe in the layout, exiting!","")
exit
end
theView = vFrame.GetView
msgbox.info(theview.asstring,"")
llink= vFrame.isLiveLinked
msgbox.info(llink.asstring,"")
if (llink = true) then
vFrame.SetView(theView, false)
vFrame.SetDisplay(theLayout.GetDisplay)
vFrame.Invalidate
aV.ProcessAllInvals
else
vFrame.SetView(theView, true)
vFrame.SetDisplay(theLayout.GetDisplay)
vFrame.Invalidate
aV.ProcessAllInvals
end
''''''' end of code
any hint much appreciated!
'''' start of code
theLayout = av.GetActiveDoc
lstGraphics = theLayout.GetGraphics
vFrame = lstGraphics.FindByClass(ViewFrame)
if(vFrame = Nil) then
MsgBox.Warning("no viewframe in the layout, exiting!","")
exit
end
theView = vFrame.GetView
msgbox.info(theview.asstring,"")
llink= vFrame.isLiveLinked
msgbox.info(llink.asstring,"")
if (llink = true) then
vFrame.SetView(theView, false)
vFrame.SetDisplay(theLayout.GetDisplay)
vFrame.Invalidate
aV.ProcessAllInvals
else
vFrame.SetView(theView, true)
vFrame.SetDisplay(theLayout.GetDisplay)
vFrame.Invalidate
aV.ProcessAllInvals
end
''''''' end of code