Jump to content
Developer Wiki and Function Reference Links ×

UndoOFF


Recommended Posts

Hi,

does it exist additional documentation for the "UndoOFF" procedure more than

http://developer.vectorworks.net/index.php/VS:UndoOff ?

My plugin take some time to regenerate so I use "Progress Dialog" to have visual feedback. If I put UndoOFF (after Begin) my plugin regenerate 2 times: when the progressbar end, it restart one more time.

Without UndoOFF it works correctly, but I need it to reduce memory use.

Thanks for your help!

Link to comment
  • 4 weeks later...

I tried everything, it's probably a bug. if you try this simple code in a linear object plugin, when it regenerates with undooff you will receive the alert message twice, if you delete undooff it will works correctly (only one alert).

Any workaround?

Thanks

PROCEDURE Example1;

BEGIN

undooff;

ovaln(0,0,0,1,1m,1m); {draw a circle}

alertinform('Plugin regenerated!','',false);

END;

Run(Example1);

Edited by AFDesign
Link to comment

I am not certain that it is an UndoOff issue, but it might be a PIO issue. I can't find it in my email history, but I think that the script of a PIO has to run multiple times when it is first placed into a drawing. I think it has something to do with going in with the default values and then updating to use the actual parameters. Hopefully someone else will be able point this out.

I made a linear PIO out of your script and got the multiple regenerations. I then commented out the UndoOff and got the same result.

If your work around is doing what you need then that is great. I don't have another work around.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...