Message 1 of 3

Not applicable
12-21-2016
06:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I have the below code to add coincident constraints between the start point of two sketch lines and a center point of a projected circle. I use the two lines to create a section view. The code works for the first coincident constraint, but when it tries to do the second one I get this: "Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))". Why does it fail?
'Draws the first section line oSectionLine = oSectionSketch.SketchLines.AddByTwoPoints( oTG.CreatePoint2d(Point1.X,Point1.Y), oTG.CreatePoint2d(Point2.X,Point2.Y)) 'Draws the second section line oSectionLine2 = oSectionSketch.SketchLines.AddByTwoPoints( oTG.CreatePoint2d(Point1.X,Point1.Y), oTG.CreatePoint2d(Point3.X,Point3.Y)) 'Adds coincident constraints. oSectionSketch.GeometricConstraints.AddCoincident( oCircularEntity.CenterSketchPoint, oSectionLine.StartSketchPoint) oSectionSketch.GeometricConstraints.AddCoincident( oSectionLine2.StartSketchPoint, oCircularEntity.CenterSketchPoint)
Solved! Go to Solution.