Lag whit batch process of occurence properties

Experimenter
Experimenter

I have write a vba macro to changed, in batch the occurence properties.

In ST8 everything work well, but with ST9 the process lag.
It take 1 second for one true/false action.

It take more time whit the macro, then the regular process.

I have only found one way to bypass this lag.
I start the macro end I try to close the assembly, when the pop-up asking do you want to save appear.

A this moment, my macro run normaly, but I don't understand why!

 

Code:

 

oApp As SolidEdgeFramework.Application

oAsm As SolidEdgeAssembly.AssemblyDocument

oOcc As SolidEdgeAssembly.Occurrence

oApp.DelayCompute = True

 

Set oAsm = oApp.ActiveDocument

oApp.ScreenUpdating = False

 

Set oOcc = oAsm.Occurrences.Item (A00001.par:1)

oOcc.DisplayInSubAssembly = False

oOcc.DisplayInDrawings = False

oOcc.IncludeInBom = False

oOcc.IncludeInPhysicalProperties = False

oOcc.Visible = False

oOcc.DisplayAsReference = False

oOcc.IncludeInInterference = False

oOcc.Locatable = True

 

oApp.DelayCompute = False

oApp.ScreenUpdating = True

 

 

Thanks!