Hi all,
I'm programming in vb6
I'm tring to create a selectionset to select the point entities inside a circle, the following code snippet is returning the all points.
Any Suddestions?
the center.x and center.y points are picked up from a prior SelectOn Screen that gets the center coords for the selected circle. Rp1 coords are returned correctly.
Dim dxfname(0) As Variant
Dim dxfnumber(0) As Integer
dfxnumber=(0)
dxfname(0)="points"
Dim HiLo As SelectionSet
Set HiLo = Thisdocument.SelectionSets.Add("set2")
Dim cp1 As IntelliCAD.point
Dim RP1 As IntelliCAD.point
Set cp1 = Library.CreatePoint(center.x, center.y, 0)
Dim radiuspt As Double
radiuspt = (cp1.x + PivotRad + 10)
Set RP1 = Library.CreatePoint(center.x, radiuspt, 0)
'MsgBox RP1.x
'MsgBox RP1.y
HiLo.Select vicSelectionSetInsideCircle, cp1, RP1, dxfnumber, dxfname
MsgBox HiLo.Count
Thanks MikeC
another way
#3Why not compare the distance between the point and the circle's center with the radius?
If smaller, it's inside..
If smaller, it's inside..