@user181 wrote:
.... I have added an error function to it to restore the osnap settings if it is canceled after reading comments about the osnap settings changing.
A few comments....
That lists a localized variable that doesn't exist in the routine [PT2], and sets a variable that is never used [pr], and lists an argument in the *error* handler that is never referred to [msg]. Also, it doesn't let you know if there was a "real" error [not just a User cancellation], and regardless of whatever the error might be [even a User cancellation with ESCape before OSMODE has been changed], it reports that it restored the OSMODE value. The attached enhancement fixes all those things.
Also, if it encounters one of those no-such-point-on-the-object errors because an end is inside the gap-Break range, it won't Break it at all, whereas I would want it to Break it appropriately on the one side where it can. The attached does that -- if a nominal Break point would be before the start of the object, it uses the start point instead, and if it would be past the end, it uses the end point.
And it has some other features, such as that it won't accept zero or a negative number for the gap size, and on first use, it won't accept Enter but will insist on being given a value.
Kent Cooper, AIA