# Data_PartSwitch

This page documents the V-SwiFT module-data root object.

## Purpose

`Data_PartSwitch` is the authored container that holds all V-SwiFT variant data for a part.

## Source-backed type

* C# type: `VSwift.Modules.Data.Data_PartSwitch`
* base type: `ModuleData`
* module behaviour type: `VSwift.Modules.Behaviours.Module_PartSwitch`
* interfaces: `IMassModifier`

## Key fields

* `VariantSets: list[VariantSet]`
* `ActiveVariants: list[string]`
* `PredefinedDynamicNodes: list[AttachNodeDefinition]`
* `MassModifier: float`

## Runtime role

* `VariantSets` defines the authored switch structure.
* `ActiveVariants` stores the currently selected variant IDs by set index.
* `PredefinedDynamicNodes` seeds attach-node data in OAB before variant transforms are applied.
* `MassModifier` is used as an OAB mass delta accumulator and participates through `IMassModifier`.

## OAB and UI behavior

`GetPartInfoEntries(...)` adds a V-SwiFT part-info section and surfaces variant-set / variant names in the OAB information panel, including tech requirement labels where present.

## Example

```patch
+Data_PartSwitch {
    +BodyStyle {
        +Compact {}
        +Extended {}
    }

    PredefinedDynamicNodes: [
        {
            nodeID: top_extra,
            size: 1,
            position: { x: 0, y: 1.25, z: 0 },
            orientation: { x: 0, y: 1, z: 0 }
        }
    ];
}
```

## Notes

The selected variant state is normalized at runtime. If an `ActiveVariants` entry is missing or no longer matches a valid variant, V-SwiFT falls back to the first variant in that set.