There's a way to add the total mass last row for a part list in drawings?
Here below i show a picture of what i mean exactly.
Thanks in advance.
Hi @rbertoletti
You will need to loop through the part list row of a specific column and sum the value of the cell. You will need to use the Inventor API for this. First find the part lists object in the list of objects. Usually there is samples associated with the big objects. See partlist query sample here written in vba
Here it is converted to VB.Net for use in the ilogic environment. This won’t be exactly what you need but a starting point in how to return values from the partlist. If you try and filter for the column you need then you will be working towards your solution. Post up your attempts here with questions and I will be happy to help.
Sub Main
PartListQuery
End Sub
Public Sub PartListQuery()
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
' Set a reference to the first parts list on the active sheet.
' This assumes that a parts list is on the active sheet.
Dim oPartList As PartsList
oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(1)
' Iterate through the contents of the parts list.
Dim i As Integer
For i = 1 To oPartList.PartsListRows.Count
' Get the current row.
Dim oRow As PartsListRow
oRow = oPartList.PartsListRows.Item(i)
' Iterate through each column in the row.
Dim j As Integer
For j = 1 To oPartList.PartsListColumns.Count
' Get the current cell.
Dim oCell As PartsListCell
oCell = oRow.Item(j)
' Display the value of the current cell.
Logger.Info( "Row: " & i & ", Column: " & oPartList.PartsListColumns.Item(j).Title & " = "; oCell.Value)
Next
Next
End Sub
Can't find what you're looking for? Ask the community or share your knowledge.