Message 1 of 4
how get all intersection point

Not applicable
09-05-2019
11:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
'i have code to draw circle to all intesection point but not all circle draw to intesection point
what wrong with mycode
Sub test() Dim ss As AcadSelectionSet Dim line As AcadLine, InterCord As Variant Dim cir As AcadCircle, Mtx As AcadMText, fd As Boolean, go As Boolean Set ss = ThisDrawing.SelectionSets.Add(Now) ss.SelectOnScreen For I = 0 To ss.Count - 1 If TypeOf ss.Item(I) Is AcadLine Then Set line = ss.Item(I) line.color = acMagenta line.Update For j = I + 1 To ss.Count - 1 Set line1 = ss.Item(j) line1.color = acRed line1.Update InterCord = line.IntersectWith(line1, acExtendNone) If UBound(InterCord) = 2 Then Debug.Print InterCord(0), InterCord(1), InterCord(2) Set cir = ThisDrawing.ModelSpace.AddCircle(InterCord, 0.2) ThisDrawing.Regen (acActiveViewport) fd = True Else Exit For End If Next j End If Next I End Sub