how to deactivade an event

how to deactivade an event

Anonymous
Not applicable
271 Views
1 Reply
Message 1 of 2

how to deactivade an event

Anonymous
Not applicable
hi,
i meet the difficultiy that an event(i made before) works when i dont want
it to work,

how to swicth an event to work or not.

thank you
0 Likes
272 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
I believe what your are talking is event handler, not event itself. Event is
just an interception point built into the host application by its developer,
where you can add your logic into application process. It is always raised
as the app is designed to. However, raising an event does not necessarily
mean that some thing/process will start: if there is no event handler
corresponding to that event, or the event handler is empty (no code inside
doing actual things).

If you want the code in certain event handler only runs under specific
condition, simply use something like IF...The.... For example,

Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)

If Not condition Then Exit Sub ''' If certain condition is not met,
get out event handler immediately

''Do something here

End Sub

"youngman" wrote in message
news:4861429@discussion.autodesk.com...
hi,
i meet the difficultiy that an event(i made before) works when i dont want
it to work,

how to swicth an event to work or not.

thank you
0 Likes