rgriebl / brickstore

An offline BrickLink inventory management tool.
https://www.brickstore.dev/
GNU General Public License v3.0
110 stars 27 forks source link

Extension Scripting: document.lotCount with active filter #840

Closed mmally closed 4 months ago

mmally commented 4 months ago

a document has e.g. 10 items I set a filter so that only 3 items remain e.g. Index 1, 4 and 6

if I now call document.lotCount it returns 3. now I want to iterate those 3 filtered items:

for (var i=0; i<items; i++)
{
    let current=thisDoc.lots.at(i)
    console.log("ItemId:" + current.itemId)
}

this returns - of course - the items at index 0, 1 and 2.

Currently I see no way to access only the filtered lots

rgriebl commented 4 months ago

New docs are available now: https://www.brickstore.dev/extensions/qml-brickstore-document.html

mmally commented 4 months ago

Thank you for the quick solution !