Message 1 of 4
Problem using intersectWith

Not applicable
08-04-2015
09:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
please refer the drawing attached. If i use intersectwith for the 2 lines in left, it works,
where as if i use the same with right side 2 lines, it does not. below is the syntax i used.
Sub intersectLine()
Dim ssetObj As AcadSelectionSet
On Error Resume Next
ThisDrawing.SelectionSets("TEST_SSET").Delete
On Error GoTo 0
Set ssetObj = ThisDrawing.SelectionSets.Add("TEST_SSET")
ssetObj.SelectOnScreen
IntPoint = ssetObj.Item(0).IntersectWith(ssetObj.Item(1), acExtendBoth)
MsgBox (UBound(IntPoint))
End Sub
for left set of lines it returns 2, whereas for right set of lines it returns -1.
the 2 lines on right were copied from different files. i cross checked the properties, but could not get a clew.
Need help.