Hi @ktucker86UDQ. I am not sure that we have the ability to flip the direction of a section view in a model document using normal iLogic or Inventor API code, but we can definitely create them and modify them in other ways. When they are created by code, the 'Normal' (a UnitVector indicating natural direction) of the plane is used to indicate which side of the plane will be removed. You can check the Normal of the plane before you use them to create a section view, and can inspect the normal of the retrieved planes when inspecting an already existing section view. The SectionDrawingView object in a drawing does have a ReverseDirection method (among others) allowing you more control over it. But during my investigation, I did manage to create a simple iLogic rule that will reverse the direction of an existing section view in a part document. This code mainly uses the same commands that are used in the user interface tools to make things happen, so this is less ideal than using API code for the same task. It expects that the 'active' DVR (DesignViewRepresentation) is the one with the section view stored in it that we want to target, but you could likely just activate the one you want to work on instead if you wanted. Here it is anyways.
Dim oPDoc As PartDocument = ThisDoc.Document
Dim oDVR As DesignViewRepresentation = oPDoc.ComponentDefinition.RepresentationsManager.ActiveDesignViewRepresentation
oPDoc.SelectSet.Clear
oPDoc.SelectSet.Select(oDVR)
Dim oCDs As ControlDefinitions = ThisApplication.CommandManager.ControlDefinitions
Dim EditSectionView As ControlDefinition = oCDs.Item("DesignViewEditSectionCmd")
Dim FlipSectionDir As ControlDefinition = oCDs.Item("flipSectionDir")
Dim Done As ControlDefinition = oCDs.Item("AppContextual_DoneCmd")
EditSectionView.Execute2(False)
FlipSectionDir.Execute2(False)
Done.Execute2(False)
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield

(Not an Autodesk Employee)