QCAD.org Forum

Discussion forum for contributors and developers who are using the QCAD version 3 ECMAScript development platform or the C++ plugin interface or who are otherwise looking to contribute to QCAD (translations, documentation, etc).

Hi,I'm testing QCad/ECMAScript in order to do movement 2D animations.I ran a little test script: apply a little step (1,1) movement on a preselected block, inside a for cycle, with a sleep between every step.I get no errors, but I can't see intermediate positions: only the last one (when its time comes, at last of the animation); so I see no animation.Also: at the end of actions I cannot select the moved block unless I do it with a selection window which includes also the original position of the block (so it looks).If I run QCad with debugger enabled the problem doesn't appear.There might be some update problems with document or rappresentation data of entities.I tried all update/repaint/regenerate commands in the document interface with no effect.I run QCad-trial 3.0 on a Windows 7 SP1 (64bit) machine.This is the testing code:

Note that processing events inside a script is not recommended. It allows the user to 'do something' while your script is running (e.g. close the document, open a new file, etc.). This can have very undesirable effects (crashes).