|
saveas jpg/step/ on ondestroy
hi
can enyone help me.
i have written an api. i want to save my part/assembly/drawing in different formats just before the user is closing the document. i use the destroynotify event and the modeldoc2.saveas4. it is ok, if it is a .igs file, but if it is .jpg file then the file is generated and the resultkode is ok, but the file is empty.
if i make the same save in the savetostoragenotify event, then it is ok.
best regards
hanne vedel
cadsys
you shouldn't be calling any intensive or important functions in the ondestroy event handler as it is unsafe and your image will be blank because some of the handles and pointers to the document is probably destroyed at that point.
change your saving function to run on another event handler before it is destroyed. |
|