How Not to update an assembly when part is closed

Hi,

I am in a bit of a struggle ad hoping someone can help.

I have an assembly open and I am opening one of the parts of thatassembly flattening it then folding it back up and closing the partagain then showing the assembly again.

My problem is every time I close one of parts, the assembly updatesso it takes along time for this to happen. I want to suspend therebuild so no rebuilds happen while my code is running.

I found this in the API help "EnableAssemblyRebuild" but it doesnot seem to be working.

SolidworksApi macros