Macro to add a cut list propertie just to sheet metal items?

HI everyone! How are you doing?! I´m having troubles to add a cut list propertie to each sheet metal part inside my multibody project. For example: I want to add a property "Description" with has the value " anything". I took a macro in this forum that does it, but it add the propertie to the weldments too, like tubes or extrusion bodyes.

Dim swApp As SldWorks.SldWorks

Dim swModel As SldWorks.ModelDoc2

Dim swModelDocExt As SldWorks.ModelDocExtension

Dim swFeat As SldWorks.Feature

Dim swDeleteFaceFeature As SldWorks.DeleteFaceFeatureData

Dim swCustPropMgr As SldWorks.CustomPropertyManager

Dim names As Variant

Dim textexp As String

Dim evalval As String

Dim featureName As String

Dim boolstatus As Boolean

Dim opt As Long

Sub main()

Set swApp = Application.SldWorks

Set swModel = swApp.ActiveDoc

Set swModelDocExt = swModel.Extension

' Get the DeleteFace feature

Set swFeat = swModel.FirstFeature

Do While Not swFeat Is Nothing

If swFeat Is Nothing Then

Exit Do

End If

featureName = swFeat.Name

There is a way to say the SoliWorks: " Hey buddy, from here to bottom let just sheet metals pass thrugh! ".

This is a macro in VBA that will allow you to determine in a cut list item was created as sheet metal or as a weldment.

Dim swApp As ObjectSub main()

Set swApp = Application.SldWorksDim thisFeat As SldWorks.FeatureDim thisSubFeat As SldWorks.FeatureDim custPropMgr As SldWorks.CustomPropertyManagerDim retValue As IntegerDim retDescription As StringDim retDescription1 As StringDim retLength As StringDim retLength1 As StringDim retWidth As StringDim retWidth1 As StringDim retSheet As StringDim retSheet1 As StringDim nameS As VariantDim cutListFolder As SldWorks.BodyFolderDim boolstatus As BooleanDim value As Integer

Set thisFeat = Application.SldWorks.ActiveDoc.FeatureByName("Solid Bodies")Set cutListFolder = thisFeat.GetSpecificFeature2Debug.Print cutListFolder.SetAutomaticCutList(True) If Not cutListFolder Is Nothing And cutListFolder.UpdateCutList Then Debug.Print "Updated"

Set thisSubFeat = thisFeat.GetFirstSubFeature

Do While Not thisSubFeat Is Nothing

If thisSubFeat.GetTypeName = "CutListFolder" Then Set cutListFolder = thisSubFeat.GetSpecificFeature2 If Not cutListFolder Is Nothing And cutListFolder.GetBodyCount > 0 Then

it is vb.net language. it is similar but some things not working in VBA. I did not have enough time to convert it my code to VBA from VB.net. It just part of my code. Ctype not working in VBA. such code line in VB.net: