Jump to content
Developer Wiki and Function Reference Links ×

vsoStateAddCurrent and EventMessage = 14


Recommended Posts

In the procedure I call for the kObjOnAddState event has the following set of lines

 

 

EventMessage := vsoStateAddCurrent(PIOHan, EventMessage);

IF EventMessage = 14 THEN {Cable Instance is DELETED}

BEGIN

{Gets rid of stuff in other objects}

END;

 

However the EventMessage that is returned when I move a cable from one layer to another is also “14”.  This results in the {Gets rid of stuff in other objects} code being executed.  Clearly I don’t have a good understanding of what’s happening.

 

Is there a way to distinguish between moving a cable from layer to layer and deleting the cable?

Link to comment

I looked into my notes and found this list of events that occur on specific triggers. Looking at these events, it seems that to move an object to another layer it's destroyed and recreated after, or at least those states are triggered. The internal index of the object stays the same though.

 

With the SDK you can actually catch that exception when looking at the data provided in the event 14, but I'm unsure if this is available in Vectorscript.

afbeelding.png.725c0e580a10d2cad726e8b9139c9e70.png

afbeelding.png.5faa64536c5f98a1e684ca9b415485f8.png

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