Jump to content
Sign in to follow this  


Recommended Posts


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!

Share this post

Link to post

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?





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

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



Edited by AFDesign

Share this post

Link to post

I finally found a workaround, if someone is interested:

1) SetMaximumUndoEvents(0);

2) execute script

3) restore maximum undo events

:) end of monologue

Share this post

Link to post

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.

Share this post

Link to post

Pat is right. The first time you create each pio it runs twice.

I think the event constant is named OnFirstRegen or something similar, followed by the Recalculate event.

Edited by hippothamus

Share this post

Link to post

Thank you, I will try to get more info about this. But if I don't use undooff I get only one regen, not two.

Share this post

Link to post

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.

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.

Sign in to follow this  


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...