Jump to content
Developer Wiki and Function Reference Links ×

Updating objects during IDLE event (without undo events)


KN_Michael

Recommended Posts

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
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...