Message 1 of 7

Not applicable
06-04-2020
05:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey fellows,
I want to put create a conincident constraint between the midpoints of two lines. I already found out, that if you want to constrain midpoints via the API you have to use the MidPointConstraint Object.
I tried to accomplish it with the following code, but it doesn´t give me the same result, as if I would create the constraint via the Inventor User Interface. Enclosed you find a picture of the desired result 🙂
SketchPoint sketchPoint = planarSketch.SketchPoints.Add(InventorSketchLine1.Geometry.MidPoint);
MidpointConstraint midpointConstraint = planarSketch.GeometricConstraints.AddMidpoint( sketchPoint , InventorSketchLine1);
Has anyone stumbled across the same problem and knows a solution?
Best regards 🙂
Solved! Go to Solution.