Message 1 of 2

Not applicable
02-11-2016
02:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I don't seem to get it, Inventor is randomly choosing a direction for my section view with each different drawing. I don't know how to force the section direction via code. When it faces the wrong direction, the program will continue to create dimensions, and they will have a 0 point connection, and fail, and the Inventor application becomes unstable and sometimes crashes.
'end view as a drawing section view: Dim pntEndView As Point2d = tg.CreatePoint2d(6 * 2.54, 6 * 2.54) Dim skSection As DrawingSketch = vSide.Sketches.Add() skSection.Edit() Dim pnt1 As Point2d = tg.CreatePoint2d(vSide.Left - DimOffset, vSide.Top + DimOffset) pnt1 = skSection.SheetToSketchSpace(pnt1) Dim pnt2 As Point2d = tg.CreatePoint2d(vSide.Left - DimOffset, vSide.Top - vSide.Height - DimOffset) pnt2 = skSection.SheetToSketchSpace(pnt2) Dim lSection As SketchLine = skSection.SketchLines.AddByTwoPoints(pnt1, pnt2) skSection.ExitEdit() Dim vEnd As SectionDrawingView = shClearance.DrawingViews.AddSectionView(vSide, skSection, pntEndView, DrawingViewStyleEnum.kHiddenLineRemovedDrawingViewStyle, CDbl(1 / 40)) 'vEnd.ReverseDirection() vEnd.Aligned = False vEnd.Position = pntEndView Dim pEndLabel As Point2d = vEnd.Label.Position pEndLabel.TranslateBy(tg.CreateVector2d(0, -2 * 2.54)) vEnd.Label.Position = pEndLabel
I can reverse direction, but I want to make sure it is pointing in the correct direction in the first place. Please help.
Solved! Go to Solution.