Hello,
Sorry if I am using wrong terms.
I am trying to find intersection of all curves with each other and GetSplitCurves to break from intersection points.
My selection set command is like that:
Dim res2 As PromptSelectionResult = ed.SelectCrossingPolygon(Points, New SelectionFilter(New TypedValue() {New TypedValue(0, "line,lwpolyline,polyline,arc,point,circle,insert"), New TypedValue(CInt(DxfCode.LayerName), a)}))
And breaking curve is: I tried to remove unnecassary code
Dim horIds As ObjectIdCollection = New ObjectIdCollection(res.Value.GetObjectIds)
Dim ch As Curve = TryCast(tr.GetObject(horIds(i), OpenMode.ForRead), Curve)
.....
Dim objs As DBObjectCollection = ch.GetSplitCurves(pars)
For Each obj As DBObject In objs Dim en As Entity = TryCast(obj, Entity) btr.AppendEntity(en) tr.AddNewlyCreatedDBObject(en, True) horIds.Add(en.ObjectId) ch.UpgradeOpen() ch.[Erase]() Next
After breaking there comes new curves, but since transaction.commit is not executed until the end of all run, new curves are not saved and selection set does not find these newly added curves in the next do...loop, and the user must rerun the code several times to find all intersections. I tried to add transaction.commit after the above code re sent to the begging then it works fine but it is so time consuming more than 10x since looking up intersection from the beginning everytime.
How can I do this.
Regards,
The problem is with the SelectCrossingPolygon, if I change it to selectall it finds all newly added objects.
Dim res2 As PromptSelectionResult = ed.SelectAll(New SelectionFilter(New TypedValue() {New TypedValue(0, "line,lwpolyline,polyline,arc,point,circle" & If(CheckBox11.Checked, ",insert", "")), New TypedValue(CInt(DxfCode.LayerName), a)}))
The screen is zoomed to extents, and I tried Application.UpdateScreen() and ed.Regen() before the SelectCrossingPolygon but nothing changed. The polygon boundary is correct I have checked with drawing polyline, and SelectCrossingPolygon also works if the command is executed 2nd or 3rd.... times. The problem is to make it work at 1st time and without selecting unnecessary object like in the selectall.
What can I do?