Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have a simple code that creates the dimension of a drawing view when a curve is selected. I have a problem with the line from break out, the red line on the left. On the right everything looks ok. the GeometryIntent point is the same as in the drawing, but the dimension was created lower. Why?
Dim drawingDocument As DrawingDocument = ThisApplication.ActiveDocument
Dim sheet As Sheet = drawingDocument.ActiveSheet
Dim drawingCurveSegment As DrawingCurveSegment = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingCurveSegmentFilter, "Select line")
Dim drawingCurve As DrawingCurve = drawingCurveSegment.Parent
Dim startPoint As Point2d = drawingCurve.StartPoint
Dim endPoint As Point2d = drawingCurve.EndPoint
Dim geometryIntent1 As GeometryIntent = sheet.CreateGeometryIntent(drawingCurve, startPoint)
Dim geometryIntent2 As GeometryIntent = sheet.CreateGeometryIntent(drawingCurve, endPoint)
Dim textPoint As Point2d = ThisApplication.TransientGeometry.CreatePoint2d(startPoint.X - 1, (startPoint.Y + endPoint.Y) / 2)
sheet.DrawingDimensions.GeneralDimensions.AddLinear(textPoint, geometryIntent1, geometryIntent2, DimensionTypeEnum.kVerticalDimensionType)
Solved! Go to Solution.