Flashing TemporaryBody Feature preview Mouse Event

Hallo,

I'm trying to create the event of the movement of the mouse to preview the feature during insertion of points in the holes.

My problem, as seen in the attached video is that the feature flash continuously even when the mouse is stopped, you see both the temporary body both in StatusBar Solidworks.

I tried turning off the graphics generation, but it is not the right solution.

These are my steps to generate the temporary body:

Function TheMouse_MouseMoveNotify(ByVal X As Long, ByVal Y As Long, ByVal WParam As Long) As Long

swBodytemp = Nothing

GC.Collect()

GC.Collect()

swModeldoc.GraphicsRedraw2()

''''

''''

''''

PreSelectionPoint(SwModeldoc_Globale, ModViewX, ModViewY, RefFace)

swBodytemp = swModeler.CreateBodyFromCyl(CylDimArray)

retval = swBodytemp.Display3(MyswPart, 0, swTempBodySelectOptions_e.swTempBodySelectOptionNone) 'IN MY OPINION THE PROBLEM HERE IS , BECAUSE FOR EVERY CREATION OF THE MODEL REDRAW THE GRAPHIC AREA

End Function

Have you an idea for fix this problem?

Thanks to every one

Roberto

SolidworksApi macros