add drawing dimensions as annotations to drawing view

add drawing dimensions as annotations to drawing view

LIUZHILI8888
Enthusiast Enthusiast
162 Views
0 Replies
Message 1 of 1

add drawing dimensions as annotations to drawing view

LIUZHILI8888
Enthusiast
Enthusiast

what is problem with this code?for example 360截图20230914162330876.jpg

DrawingCurvesEnumerator drawingCurves = drawingView.DrawingCurves;
DrawingCurve drawingCurve1 = null;
DrawingCurve drawingCurve2 = null;
DrawingCurve drawingCurve3 = null;
DrawingCurve drawingCurve4 = null;
drawingCurve1 = drawingCurves[1];

drawingCurve2= drawingCurves[2];

drawingCurve3 = drawingCurves[3];
drawingCurve4 = drawingCurves[4];


GeometryIntent firstGI = sheet.CreateGeometryIntent(drawingCurve1);
GeometryIntent SecondGI = sheet.CreateGeometryIntent(drawingCurve2);
GeneralDimensions generalDimensions = sheet.DrawingDimensions.GeneralDimensions;
Point2d point2D1 = inventorApp.TransientGeometry.CreatePoint2d(15,15);
LinearGeneralDimension linearGeneralDimension = generalDimensions.AddLinear(point2D1, firstGI, SecondGI,DimensionTypeEnum.kAlignedDimensionType);
linearGeneralDimension.CenterText();

0 Likes
163 Views
0 Replies
Replies (0)