70001178 How to realise if an action canceled from the user or completed

Article 70001178
Type HowTo
Product WebJS
Version 7
Date Added 9/29/2017
Fixed 7.7012.0.7 (9/29/2017)
Submitted by Brendan Fry


How can i realise if a scriptCommand canceled from the user or completed from its delegate


We can realise when the action is canceled or completed by checking the entity.If it is null the action is canceled and if it is not null the action is completed.
Generally the action completes by right click and it cancels with Esc.

 function ScriptEntityDelegate(vdrawObj vdraw,object entity); {
    if(entity == null)// action is canceled by user
    if(entity != null)// action is completed 

Send comments on this topic.