Author Topic: >PolygonSelection can't be sticky  (Read 830 times)


  • Newbie
  • *
  • Posts: 1
>PolygonSelection can't be sticky
« on: May 31, 2017, 11:55:49 PM »
Hello everyone,

for one of my macros I need to be able to select entities using a selection box at an arbitrary angle...  ::)  I was thinking about this for a long time, because >DragSelect obviously can't just be rotated.

The solution I came up with works for about half the cases I need the angled selection box. Basically, I'm using a series of complicated SIN() and COS() calculations after a quick >AngleDistance to calculate the four corner points of the angled selection box, then I run >PolygonSelection and pass it the four corner points.

This works fine if I want to get a similar behaviour to "Type 0" of >DragSelect, which only selects entities which are inside the selection box entirely. But if I want to select any entity touching the angled selection box, >PolygonSelection leaves me hanging.

Currently I don't see an easy way around this, but it could easily be fixed if the >PolygonSelection command offered you these "Types" of different selections as well, with one type being "select only items inside or touched by box".


Rob S

  • Hero Member
  • *****
  • Posts: 4543
    • Construction Estimating Program for General Contractors
Re: >PolygonSelection can't be sticky
« Reply #1 on: June 01, 2017, 07:36:44 AM »
You could consider temporarily rotating your entire drawing, and then using a normal selection box?
User since Pro-design


  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4231
Re: >PolygonSelection can't be sticky
« Reply #2 on: June 01, 2017, 10:14:53 AM »
Maybe use SetWorkingPlane to temporarily rotate the coordinate axes, and then use dragselect? Calculating the new position of the bounding box would then require some mathematics, but it sounds like you're up to it. Then use ResetWorkingPlane when you're done.
25 years with DesignCAD