Jump to content
Developer Wiki and Function Reference Links Read more... ×
KN_Michael

Updating objects during IDLE event (without undo events)

Recommended Posts

Posted (edited)

Background

I'm trying to calculate connection points between objects by throwing each object I create/edit after creation/change/delete into a custom IVWSingletonUnknown object. In this class I have a simple queue collecting those objects. This queue is processed later on whenever vectorworks reports an idle event (kNotifyAfterPendingUpdate). In the idle event I now process the queue.

 

What happens in the idle event

I simply iterate over all objects in the queue, calculate some internal data (like connection point X is connected with object Y's connection point Z) and save this data into the objects (in a custom tag). Afterwards I call gSDK->ResetObject(handle) with every object that has changes - because connections are drawn by each object to be visible to the user. This works fine until I try to undo/redo events

 

Problems I face

It seems like that I can't change objects from the idle event without them being pushed into the undo table - I want to avoid this. I see that trying to undo a delete after the idle event regenerated objects is not working anymore - simply nothing is happening in VW although the old handle reappears in code but is not really restored as it does not reappear in VW.

 

Can someone help me with this problem? Can I somehow exclude all actions done in the idle event from the undo system (without clearing the undo table)? I manually take care that objects push theirself into my singleton manager class after restore and before deletion and so on, so I really want that VW ignores any change I make to my objects in the idle event.

Edited by KN_Michael

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

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.

×