The VBA forum deals with IntelliCAD 2000 VBA (Visual Basic for Applications) issues.

Moderator: CMS Inc

Post Reply
Posts: 6
Joined: Sat Feb 24, 2007 12:01 am
Location: springville,utah,usa


Post by MikeC » Fri Apr 25, 2008 2:58 pm

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


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
John Finlay

Post by John Finlay » Mon Apr 28, 2008 11:31 am


I don’t believe that the vicSelectionSetInsideCircle option is activated.
I have tried this and nothing seems to work.

You may have to use "select by polygon". Create a points collection to trace over the circle.
Valued Contributor
Posts: 28
Joined: Thu Jul 05, 2007 6:42 pm

another way

Post by efernal » Mon Apr 28, 2008 5:16 pm

Why not compare the distance between the point and the circle's center with the radius?
If smaller, it's inside..
Post Reply