The following VB.Net sample illustrates how to create a parts list from the first drawing view:
Sub CreatePartsList(ByVal app As Inventor.Application)
Dim doc As DrawingDocument = app.ActiveDocument
Dim tg As TransientGeometry = app.TransientGeometry
Dim v As DrawingView = doc.ActiveSheet.DrawingViews.Item(1)
Dim pt As Point2d = tg.CreatePoint2d(100.0, 100.0)
Dim plist As PartsList = doc.ActiveSheet.PartsLists.Add(
v,
pt,
PartsListLevelEnum.kPartsOnly,
Nothing, 0, False)
End Sub