So in SW2010, GetBodyCount does not always return an accurate quantity for cutlist items.
I finally figured out a way to get an accurate quantity! Seems so obvious now...
Set swFeature = g_swDoc.FirstFeature
Do While Not swFeature Is Nothing
'look for cutlist items, If the type of feature is "CutListFolder" then dive into its properties
If swFeature.GetTypeName = "CutListFolder" Then
Set swCustPropMgr = swFeature.CustomPropertyManager
'BAD=> CutListQty = swFeature.GetSpecificFeature2.GetBodyCount
'Get quantity. SW2010 GetBodyCount glitches; loop thru manually to get right body count
CutListQty = 0
vBodies = swFeature.GetSpecificFeature2.GetBodies
If Not IsEmpty(vBodies) Then
For Each Body In vBodies
If (Not Body Is Nothing) Then CutListQty = CutListQty + 1
Set swFeature = swFeature.GetNextFeature
This also happens in SW 2013. I am trying to use the code
It keeps coming back as Zero (0) bodies. Using the code you posted works but I am curious why the GetBodyCount doesnt work.
Retrieving data ...