I am interested in getting all the four points of a rectangle when using Rectangle selection.
I know how to do this using NXOpen.UIStyler.
1) using NXOpen.UIStyler, we can get the SelectionHandle
2) AskSelectionRectanglePosition gives us the four points of the rectangle drawn by the mouse.
I am looking ot do the same using a block styler.
I have a custom dialog which has a curve selector which allows me to select curves in a sketch.
When there are many curves, I want to create a rectangle to select all the curves at once which lie within the rectangle..
I am looking to get all the points of the rectangle in this scenario.
Is there any API that can help me achieve this for block styler?
Thanks in advance.
You stated you are using the Curve Collector block - that supports multiple selection (including rectangle select) and returns an array of objects. You would then need to process the array. I am not sure there is a property for the points of the selection rectangle.
You are right!
I do have the list of objects in an array.
For my application, I require the rectangle points for the following reason.
I would like to get the points where the rectangle meets the curves. Refer the image attached.
As there is no direct API to get the points, I plan to ge those points using my own logic.
For this purpose I need the rectangle points.
What do you plan on doing if the user has set the selection preference to "lasso" and there is no rectangle to get?
The required selection preference is "Rectangle".
Even if lasso is selected, it will be changed to "Rectangle" at the start of tool execution.
Original settings will be reset at the end of execution.