The "AddBaseView" has an optional parameter that allows you to specify if the SheetMetal model has to be represented folded or unfolded when creating the view.
Below is a code sample that illustrates the creation of an unfolded base view. To run the sample without modification, close all documents in Inventor, open a SheetMetal Part, then create a new empty drawing and execute the code.
Public Sub CreateSheetMetalViewUnfolded()
' assume we have had Inventor application
' _InvApplication
Dim oSheetMetalDoc As PartDocument
oSheetMetalDoc =
_InvApplication.ActiveDocument
' Make sure the document is a sheet metal document.
If oSheetMetalDoc.SubType <>
"{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
MsgBox("A sheet metal document must be open.")
Exit Sub
End If
Dim oDrawingDoc As DrawingDocument
oDrawingDoc =
_InvApplication.Documents.Add(
DocumentTypeEnum.kDrawingDocumentObject)
Dim oSheet As Sheet
oSheet = oDrawingDoc.ActiveSheet
' Create a new NameValueMap object
Dim oBaseViewOptions As NameValueMap
oBaseViewOptions =
_InvApplication.TransientObjects.CreateNameValueMap
'Set Unfolded model view
oBaseViewOptions.Add(
"SheetMetalFoldedModel", False)
Dim oTG As TransientGeometry
oTG = _InvApplication.TransientGeometry
'Create the base view.
Dim oFrontView As DrawingView
oFrontView =
oSheet.DrawingViews.AddBaseView(
oSheetMetalDoc,
oTG.CreatePoint2d(oSheet.Height * 0.5,
oSheet.Width * 0.5),
1.0#,
ViewOrientationTypeEnum.kDefaultViewOrientation,
DrawingViewStyleEnum.kHiddenLineDrawingViewStyle,
"FlatPattern", ,
oBaseViewOptions)
End Sub