diff --git a/solidworks-api/document/cut-lists/copy-custom-properties/Macro.vba b/solidworks-api/document/cut-lists/copy-custom-properties/Macro.vba index a4127a1d..668157e4 100644 --- a/solidworks-api/document/cut-lists/copy-custom-properties/Macro.vba +++ b/solidworks-api/document/cut-lists/copy-custom-properties/Macro.vba @@ -58,8 +58,17 @@ Function GetCutListPropertyManager(model As SldWorks.ModelDoc2) As SldWorks.Cust While Not swFeat Is Nothing If swFeat.GetTypeName2() = "CutListFolder" Then - Set GetCutListPropertyManager = swFeat.CustomPropertyManager - Exit Function + + Dim BodyFolder As SldWorks.BodyFolder + Set BodyFolder = swFeat.GetSpecificFeature2 + + Dim BodyCount As Long + BodyCount = BodyFolder.GetBodyCount + + If BodyCount <> 0 Then + Set GetCutListPropertyManager = swFeat.CustomPropertyManager + Exit Function + End If End If Set swFeat = swFeat.GetNextFeature @@ -97,4 +106,4 @@ Sub CopyProperties(srcPrpMgr As SldWorks.CustomPropertyManager, targPrpMgr As Sl Err.Raise vbError, "", "No properties to copy" End If -End Sub \ No newline at end of file +End Sub