Message 1 of 8
Merge Points
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Why does this code fragment not work? (Within an active part sketch, with some sketched geometry.)
I'm just trying to close the loops to have valid extrusion profiles.
Please help.
Dim iCounter As Integer Dim icounter2 As Integer Dim oSPoint1 As SketchPoint Dim oSPoint2 As SketchPoint Dim xVal1 As Double Dim xVal2 As Double Dim yVal1 As Double Dim yVal2 As Double For iCounter = 1 To oSketch.SketchPoints.Count For icounter2 = 2 To oSketch.SketchPoints.Count If iCounter <> icounter2 Then xVal1 = oSketch.SketchPoints(iCounter).Geometry.X xVal2 = oSketch.SketchPoints(icounter2).Geometry.X yVal1 = oSketch.SketchPoints(iCounter).Geometry.Y yVal2 = oSketch.SketchPoints(icounter2).Geometry.Y If xVal1 = xVal2 Then If yVal1 = yVal2 Then Set oSPoint1 = oSketch.SketchPoints(iCounter) Set oSPoint2 = oSketch.SketchPoints(icounter2) oSPoint1.Merge (oSPoint2) End If End If End If Next Next
=============================================
This is my signature, not part of my post.
This is my signature, not part of my post.