The
PreserveSelection property returns or specifies a value that indicates whether the current selection should always be preserved when changing properties of other shapes. Generally, when CorelDRAW changes a property of a shape (for example, changing its size, fill, or outline), it must first select that shape. By default, CorelDRAW stores the current selection and then selects another object, modifies it, and restores the previous selection. This may cause a considerable slowdown in performance when many shapes are in the original selection. If the original selection is not important for macro execution, you can set the
PreserveSelection property to
False to improve macro performance. It is important to restore the property's previous settings when exiting the macro; otherwise, your code may affect the execution of other macros. You can use the
SaveSettings or
RestoreSettings methods to save and restore the value of this property or simply assign it to a local variable.