|
destroynotify event
hello, everyone,
i attached the "destroynotify" event to each opened part document. now i want to get modeldoc2 handle of the part document if it is being closed. but the event process function has no input argument. i don't know how to get the modeldoc2 handle.
please help.
newform
have you tried to get the active document? i'm not sure but i'd start by getting the current active document. i'm thinking that the document becomes active when the destroy notify event for the document fires.
hi, mattew,
thank you very much for your suggestion.
i had a try to get the active document. it works for most documents except the following case:
i opened a part document, say a, whose referenced part document, say b, is opened automatically by solidworks. the destroy event will be invoked twice if i close a. the handle of a will be obtained twice. however b remains opened. if i try to close b, the event will not be invoked. i cannot get handle of b.
is it because i didn't attach the event to the referenced document b, since b is opened by solidworks automatically?
edited: 09/11/2008 at 04:11 pm by newform newform
quick |
|