- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
My drawing has one view with one sketch attached to it and 2 circles drawn inside the sketch.
I would like to add a dimension to the 2 sketched circles just like the one which I have added manually (see attached file)
What am I doing wrong?
Inventor.DrawingDocument dDoc = _invApp.ActiveDocument as Inventor.DrawingDocument;
Inventor.Sheet sheet = dDoc.Sheets[1];
Inventor.DrawingView view = sheet.DrawingViews[1];
Inventor.DrawingSketch sketch = view.Sketches[1];
// c1, c2 are the 2 small circles which I want to dimension
Inventor.SketchCircle c1 = sketch.SketchCircles[1];
Inventor.SketchCircle c2 = sketch.SketchCircles[2];
// dim is the existing dimension on the drawing, added manually...
Inventor.GeneralDimension dim = sheet.DrawingDimensions[1] as Inventor.GeneralDimension;
// I tried xx possible combinations of param1 and param2 on CreateGeometryIntent
Inventor.GeometryIntent intent1 = sheet.CreateGeometryIntent(c1.Geometry.Center, Inventor.IntentTypeEnum.kPoint2dIntent);
Inventor.GeometryIntent intent2 = sheet.CreateGeometryIntent(c2.Geometry.Center, Inventor.IntentTypeEnum.kPoint2dIntent);
// and this does not work...
sheet.DrawingDimensions.GeneralDimensions.AddLinear(dim.Text.Origin, intent1, intent2);
Thanks for any help,
Marco
Solved! Go to Solution.