Hi, Fadi.
As described in the
ADOxx Documentation, the event "AfterCreateModelingNode" has no exit value.
I would suggest trying the DELETE_OBJS command call, as described
here. Just add it right after the command call ERRORBOX or instead of the command EXIT (nExitValue1).
Hope it helps.
Sabin