Grasshopper API
GH_UpgradeUtilSwapComponents Method (IGH_Component, IGH_Component) |
Replace an existing component with a different one. All parameters (input and output) will be migrated.
Namespace: Grasshopper.Kernel
Assembly: Grasshopper (in Grasshopper.dll)

public static bool SwapComponents( IGH_Component oldComponent, IGH_Component newComponent )
Public Shared Function SwapComponents ( oldComponent As IGH_Component, newComponent As IGH_Component ) As Boolean
Parameters
- oldComponent
- Type: Grasshopper.KernelIGH_Component
Component current in a GH_Document. - newComponent
- Type: Grasshopper.KernelIGH_Component
Component to swap.
Return Value
Type: BooleanTrue on success, false on failure.
