Hi @markoni.vts. We can not simply navigate the rows, columns, or cells of what you see in the BOM user interface dialog by code, as we would an Excel spreadsheet. Some of that information must be retrieved by digging into the actual Documents being referenced by the assembly components which are being referenced by a row in the BOM. Then, once we get the referenced document object, we must then dig into their properties and/or BOMQuantity settings/properties.
You can review the following Inventor API object help documentations for more insight.
BOM (one per assembly)
BOMView (can be 1, 2, or 3 of these per assembly, depending on settings)
BOMRow (usually 1 per unique referenced document being represented by unsuppressed components)
BOMQuantity (defined per Document and/or per assembly component)
I do not know how the columns being shown in your images were were created behind the scenes, so I do not know how to access the data being represented in those columns. I can only assume that the column simply labeled 'QTY' represents the BOMRow.TotalQuantity property value, because that would be consistent with your explanation, but I can not be 100% sure. I also do not know what the column labeled 'NAV Šifra ' represents. Is that a custom iProperty that already exists in every component? Some of the terms / words in there are either foreign to me, or I simply do not understand, due to not being familiar with your products/designs, so more explanation may be needed to understand what they mean. When a cell in certain columns becomes 'Varies', that is often due to there being multiple ModelState versions of that same referenced file being represented by different assembly components within your assembly. In those cases, one ModelState may have a different value for things like parameters and properties, so it can not show all different values in one cell of the BOMRow.
I did update my code a bit, but since I am still not clear about all the details mentioned above, I kind of doubt this is what you wanted. And to be clear, I am only supposed to be 'helping you' figure things out, so you can learn and be able to do it yourself, not necessarily write 100% of the code myself. If it is not working exactly the way you want it to, maybe attempt to fix it yourself, then post what you have, and explain what areas you need more help with. This would be especially helpful in situations like this, where multiple pieces of super custom information is needed to be handled in different ways, that are very unique to your BOM only.
Sub Main
Dim oADoc As AssemblyDocument = TryCast(ThisDoc.Document, Inventor.AssemblyDocument)
If oADoc Is Nothing Then Return
'create list of 2-factor data pairs
Dim oNamesAndPhrases As New Dictionary(Of String, String)
'name of custom iProperty, then text to search for in Title iProperty value
oNamesAndPhrases.Add("QTY HS folija", "folija za hotstamping")
oNamesAndPhrases.Add("NAV Šifra", "NAV Šifra HS folija")
Dim oAsmCProps As PropertySet = oADoc.PropertySets.Item(4)
Dim oBOM As BOM = oADoc.ComponentDefinition.BOM
If oADoc.RequiresUpdate Then oADoc.Update2(True)
Dim oBOMView As BOMView = oBOM.BOMViews.Item(1)
For Each oRow As BOMRow In oBOMView.BOMRows
Dim oCD As ComponentDefinition = oRow.ComponentDefinitions.Item(1)
Dim oRowDoc As Document = oCD.Document
Dim sTitle As String = oRowDoc.PropertySets.Item(1).Item(1).Value 'Title
For Each oNamePhrasePair As KeyValuePair(Of String, String) In oNamesAndPhrases
'oNamePhrasePair.Value is phrase to search for in the Title
If sTitle.Contains(oNamePhrasePair.Value) Then
'oNamePhrasePair.Key is the name of the iProperty to write a value to
Try
oAsmCProps.Item(oNamePhrasePair.Key).Value = oRow.TotalQuantity
Catch
oAsmCProps.Add(oRow.TotalQuantity, oNamePhrasePair.Key)
End Try
End If
Next oNamePhrasePair
Next oRow
If oADoc.RequiresUpdate Then oADoc.Update2(True)
End Sub
Wesley Crihfield

(Not an Autodesk Employee)