
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I have created these all sketch lines using Inventor API.
oLines = oSketch1.SketchLines.AddByTwoPoints(oTransGeom.CreatePoint2d(startpointX,startpointY), oTransGeom.CreatePoint2d(endPointX,endPointY));
Now I want change the line (circled in red color) in centerlines. And this is how I have done:
ObjectCollection oFitPoints = mInventorApp.TransientObjects.CreateObjectCollection();
Point2d oPoint1 = oTransGeom.CreatePoint2d(3, 5);
oFitPoints.Add(oPoint1);
Point2d oPoint2 = oTransGeom.CreatePoint2d(4, 0);
oFitPoints.Add(oPoint2);
Centerlines oCenterLines = default(Centerlines);
oCenterLines.Add(oFitPoints, ObjectTypeEnum.kLinearGeneralDimensionObject, LineTypeEnum.kLongDashDottedLineType, false);
Since the centerlines couldn’t be add in the sketch lines I got the null exception error.
So, how do I change centerlines into sketch lines so that I could draw it using API.
Suggest me please.
With regards,
Prarthana
Solved! Go to Solution.