All Resources
Code SnippetSolidWorks API2026-02-28

Read & Write Cut-List Properties for Weldments

Access custom properties on weldment and sheet metal cut-list items — a completely different API path from standard file-level custom properties that trips up most developers.

csharp
public void ReadCutListProperties(ModelDoc2 model)
{
    var feat = (Feature)model.FirstFeature();
    while (feat != null)
    {
        if (feat.GetTypeName2() == "CutListFolder")
        {
            var folder = (BodyFolder)feat.GetSpecificFeature2();
            folder.SetAutomaticCutList(true);
            folder.UpdateCutList();

            // Cut-list properties live on the FEATURE, not the body
            var mgr = feat.CustomPropertyManager;
            string valOut = "", resolvedOut = "";
            bool wasResolved;

            mgr.Get6("Description", false,
                out valOut, out resolvedOut, out wasResolved, out _);
            Console.WriteLine($"  Description: {resolvedOut}");

            mgr.Get6("Length", false,
                out valOut, out resolvedOut, out wasResolved, out _);
            Console.WriteLine($"  Length: {resolvedOut}");

            // Write a property
            mgr.Add3("CostCenter", 
                (int)swCustomInfoType_e.swCustomInfoText,
                "WLD-100",
                (int)swCustomPropertyAddOption_e.swCustomPropertyReplaceValue);
        }
        feat = (Feature)feat.GetNextFeature();
    }
}

Why This Is Different

SolidWorks has three separate places where custom properties live:

  1. File-level properties: ModelDoc2.Extension.CustomPropertyManager[""] — applies to the whole file
  2. Configuration-specific properties: CustomPropertyManager["ConfigName"] — varies per config
  3. Cut-list properties: Feature.CustomPropertyManager on CutListFolder features — applies to individual weldment bodies or sheet metal bodies

Most developers learn #1 and #2 and assume that covers everything. Then they try to read weldment body descriptions and get nothing back — because those properties are stored at the cut-list level (#3).

How to Find Cut-List Folders

Cut-list folders are features with GetTypeName2() == "CutListFolder". They appear under the Cut list folders node in the Feature Manager tree. Each folder groups bodies that share the same profile (for weldments) or the same flat pattern (for sheet metal).

To find them, traverse the feature tree and check each feature's type name:

var feat = (Feature)model.FirstFeature();
while (feat != null)
{
    if (feat.GetTypeName2() == "CutListFolder")
    {
        // This is a cut-list item
    }
    feat = (Feature)feat.GetNextFeature();
}

Important: Update Before Reading

Cut-list data can be stale. Always call these before reading properties:

  • BodyFolder.SetAutomaticCutList(true) — enables automatic updates
  • BodyFolder.UpdateCutList() — forces a refresh of all cut-list data

Without this, you may get empty or outdated values for properties like Length, Angle, and Thickness.

Common Cut-List Properties

PropertyWeldmentsSheet Metal
DescriptionProfile name (e.g., "C Channel 6 x 8.2")"Sheet Metal"
LengthMember lengthFlat pattern bounding box length
ThicknessN/AMaterial thickness
MaterialInherited from bodyInherited from body
Bounding Box Length/WidthAvailableAvailable

Tips

  • Cut-list properties show up in weldment cut lists and sheet metal cut lists in drawings — they drive BOM content
  • You can also access the bodies in each cut-list folder via BodyFolder.GetBodies() to get IBody2 references
  • The cut-list folder feature name (feat.Name) is what appears in the Feature Manager tree — you can rename it programmatically
SolidWorks APIC#WeldmentsCut-ListSheet Metal