几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   SolidWorks二次开发 (http://www.dimcax.com/hust/forumdisplay.php?f=111)
-   -   【转帖】selectionbox solidworks crash onclose (http://www.dimcax.com/hust/showthread.php?t=4571)

yang686526 2009-04-12 07:35 PM

【转帖】selectionbox solidworks crash onclose
 
selectionbox solidworks crash onclose
hello.
i have a problem with the selectionbox handler onclose.
i have a sub onclose which is called when i close the selection box. the sub works perfect, but after end sub solidworks crash.
does someone know why?
is there a way to put a handler into a try - catch routine?
or is there a crash report from solidworks?
you should not preform any operations other than cleanups in the onclose command as things are getting disposed so may no longer exist, that will be why it is crashing.
but how can i use the result of the ok and cancel buttons?
answer you should just create a public variable in your class called ok, then in the onclose set ok to true or false based on cancel/ok, then in the afterclose function do all your work
ok thanks!
quick


所有的时间均为北京时间。 现在的时间是 11:32 PM.