Page 1 of 1

Help with selection sets.

Posted: Tue Jan 11, 2005 10:04 am
by bennieo
I am trying to create a "cookie cutter" routine that will allow the user to draw a circle around the desired area and then copy all of the entities that are either completely or partially inside the circle.
The user then selects the "cookie" location and everything outside of the circle should be trimmed.

My problem is selecting only the items that fall inside or pass through the circle.

I have tried the following and get an invalid procedure error:

Set objSS = ActiveDocument.SelectionSets.Add("SSName")
objSS.Select vicSelectionSetCrossingCircle

Posted: Tue Jan 11, 2005 2:09 pm
by bennieo
I figured out how to get the items selected by specifying the centerpoint and a point on the circle itself.

>>>>>>>>>CODE<<<<<<<<<<<<<

Set objSS = ActiveDocument.SelectionSets.Add("SetName")

Set pnt1 = ActiveDocument.Utility.GetPoint(, "Center of circle")
Set pnt2 = ActiveDocument.Utility.GetPoint(pnt1, "Edge of circle")
CircRad = Library.CalculateDistance(pnt1, pnt2)
Set SelCirc = ActiveDocument.ModelSpace.AddCircle(pnt1, CircRad)
SelCirc.update

objSS.Select vicSelectionSetCrossingCircle, pnt1, pnt2

>>>>>>>>>END CODE<<<<<<<<<<<<<

Now, can I copy the entire selection set at once or do I need to do it one object at a time?

Also, what is the best way to trim the items passing through the circle?

One more thing, how can I get a "ghost circle" to appear similar to the rubberband effect in this line of code:
Set pnt2 = ActiveDocument.Utility.GetPoint(pnt1, "Edge of circle")



[This message has been edited by bennieo (edited 01-11-2005).]