PointPicker and history script/API questions

 From:  Larry Fahnoe (FAHNOE)
10917.1 
First, is there a way to constrain the pointpicker to only allow picking an object's corner or end points?

Using pointpicker.restrictToObject( rect) at least constrains to the rectangle, but non-corner points can be picked by mistake.

Second, my script starts out making a rectangle and then “edits” it by first separating the edges and then rotating one of the edges (similar to opening the lid of a box). Oddly after the script exits, an undo will expose the rotated edge in its original position. I tried using updateWithHistory=false before the rotate or deleteHistoryData() after the rotate but neither changes this behavior. How do I avoid undo exposing this intermediate stage of the script? Seems like it is a history issue, but I’m not controlling it correctly.

Using the attached script, please click the Door checkbox to demonstrate these issues.

--Larry
Attachments: