Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions solidworks-api/document/cut-lists/copy-custom-properties/Macro.vba
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -97,4 +106,4 @@ Sub CopyProperties(srcPrpMgr As SldWorks.CustomPropertyManager, targPrpMgr As Sl
Err.Raise vbError, "", "No properties to copy"
End If

End Sub
End Sub