Wednesday, 2 August 2017

Force Sheet Orientation

                So you need to force sheet orientation in inventor and have A4 always Portrait and the rest landscape?
                This is possible out of the box and it’s working quite nicely.


                But you want to update to old drawings or want to enforce things in your company? Then we can use this code:

Dim oDrawDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim oSheet As Sheet = oDrawDoc.ActiveSheet

If oSheet.Size = Inventor.DrawingSheetSizeEnum.kA4DrawingSheetSize Then
    oSheet.Orientation = Inventor.PageOrientationTypeEnum.kPortraitPageOrientation
    oSheet.Orientation = Inventor.PageOrientationTypeEnum.kLandscapePageOrientation
End If