Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all, having trouble with this task adding a coincident constraint between two projected Curves (their midpoint) and new line added. I have had luck with add midpoint and the new line StartSketchPoint and EndSketchPoint but I was unable to just position the line in the center points but allowing it to travel freely along those two points.
Dim curve1 As DrawingCurve = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingCurveSegmentFilter, "Select a drawing Curve").Parent
Dim curve2 As DrawingCurve = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingCurveSegmentFilter, "Select a drawing Curve").Parent
Dim drawView As DrawingView = ThisDoc.Document.ActiveSheet.DrawingViews.Item(1)
Dim sketch As DrawingSketch = drawView.Sketches.Add
sketch.Edit()
Dim line1 as SketchLine = sketch.AddByProjectingEntity(curve1)
Dim line2 as SketchLine = sketch.AddByProjectingEntity(curve2)
Dim line3 As SketchLine = sketch.SketchLines. _
AddByTwoPoints(tg.CreatePoint2d(0, 10),tg.CreatePoint2d(5, 10))
sketch.GeometricConstraints.AddCoincident(line1.Midpoint,line3)
sketch.GeometricConstraints.AddCoincident(line2.MidPoint,line3)
sketch.ExitEdit()
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan
Or if this helped you, please, click (like)
Regards
Alan
Solved! Go to Solution.