[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lua zoom & grid



Dear Group

I have encountered problems with the subject commands and here are some examples of Lua scripting. I wonder if anybody can help me

-- beginning of pre-processor script
... some init data
... Lua file commands
zoom(-5,-20,20,20)	-- in this place the zoom works as predicted
..grid..()	-- any grid command gives run error
function myfunction()
...
zoom(-5,-20,20,20)	-- in this place the zoom will not work
..grid..()	-- any grid command gives run error
...
end

while 1 do
... Lua commands
...
myfunction()
...
zoom(-5,-20,20,20)	--in this place the zoom will not work
..grid..()	-- any grid command gives run error
end
...
zoom(-5,-20,20,20)	-- in this place the zoom will not work
..grid..()	-- any grid command gives run error
-- end of script

In the post-processor the zoom command by itself in the Lua script file does not do the zooming but when you click on one of the move arrows in the menu bar it does move with the zoom.

All of the grid commands in pre-processor end up with a run error "attempt to call '...' (a nil value) stack traceback:". In the post-processor, however, the grid commands work except the gridsnap('flag').

Have you experienced similar problems and solved them? I would like to hearfrom you.
Thanks,
Carl