Variables.DoAutoSave



DoAutoSave(bSave As Boolean)

Parameters

bSave As Boolean
False = Stop writting into database. True = Start writting into database.
ED
avaliable
RT
not used

Remarks

With this method you have the opportunity to stop writting changes on properties into the database. This should bring up performance improvements.

Hint: Don't forget to make a .DoAutoSave(True) after a .DoAutoSave(False) otherwise data which has been typed in VBA won't be saved. The function doesn't work when the editor loses his focus (for example when the VBA code gets debugged).

Sample:


Sub DoAutoSave()

Dim zVariables As Variables 'Object from type Variables
Dim zVariable As Variable 'Child object from type Variables

'Fill the objects
Set zVariables = MyWorkspace.ActiveDocument.Variables
'Changes on properties should not be written into the database
zVariables.DoAutoSave (False)
'Read the first variable in list
Set zVariable = zVariables.Item(0)
'Changes on properties
zVariable.DynProperties("Unit") = "Volt"
zVariable.DynProperties("Name") = "Var_1"
'Now changes should be written into the database
zVariables.DoAutoSave (True)

End Sub

See Also

Variables