Hi @bseerapathy. Are all the iPart members the same exact geometry, but just different sizes, or do some members have 'features' that other members do not have (or Suppressed features)? If the geometry is the same for all members, but just different sizes, then that would make this process the simplest scenario. In that case, we could just 'copy' the existing drawing sheet, then paste it back into the same drawing document, as a new sheet, so that it already has the view and details in it. Then just switch the DrawingView_ActiveMemberName property value so that it is pointing to the 'next' iPart member. Some view scaling (DrawingView.Scale or DrawingView.ScaleString) may be required too, if there are large size differences among the other members, to keep the view fit within the sheet. Then repeat those steps until we have a Sheet for each iPart member. At least in theory. There is not a 'built-in' method for copying a sheet within a single drawing document though, just one for copying a Sheet from one drawing document to another drawing document (Sheet.CopyTo method). And the process of creating a 'New', temporary other drawing document, just for that copying process, then trying to do the sheet copying that way usually leads to multiple possible unexpected negative issues. The steps required are super simple manually...just select a sheet, press Ctrl+C on keyboard, then unselect that Sheet, and press Ctrl+V on keyboard. So, we would have to 'simulate' those manual actions by using code based object selections, and command executions, instead of true API methods.
Below is an example custom Function routine for copying a sheet within the same drawing document that I had likely posted elsewhere in this forum also. If any of the views on the sheet have 'parent' views on another sheet, this method will not work to copy it though. There are other, further developed versions of this code process, which check for things like that, and may even offer optionally assigning a name to the new sheet, or optionally create a specified number of copies of the specified sheet, but this example below is a simpler version, just to represent the main idea and process.
Sub Main
Dim oDDoc As DrawingDocument = TryCast(ThisApplication.ActiveDocument, Inventor.DrawingDocument)
If oDDoc Is Nothing Then Return
Dim oOrigSheet As Inventor.Sheet = oDDoc.ActiveSheet
Dim oNewSheet As Inventor.Sheet = CopySheet(oDDoc, oOrigSheet)
End Sub
Function CopySheet(oDDoc As DrawingDocument, oSheet As Inventor.Sheet) As Inventor.Sheet
Dim oSS As SelectSet = oDDoc.SelectSet
oSS.Clear()
Dim oCM As CommandManager = ThisApplication.CommandManager
Dim oCDs As ControlDefinitions = oCM.ControlDefinitions
Dim oCopy As ControlDefinition = oCDs.Item("AppCopyCmd")
Dim oPaste As ControlDefinition = oCDs.Item("AppPasteCmd")
oSS.Select(oSheet)
oCopy.Execute2(True)
oSS.Clear()
oPaste.Execute2(True)
Return oDDoc.Sheets.Item(oDDoc.Sheets.Count)
End Function
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)