GH_UpgradeUtil
Exposes several utility functions for migrating parameters and wires between components useful while upgrading components.
Methods
MigrateInputParameters
#Migrate a bunch of input parameters.
Returns: True on success, false on failure.
MigrateInputParameters
#Migrate all input parameters.
Returns: True on success, false on failure.
MigrateOutputParameters
#Migrate a bunch of output parameters.
Returns: True on success, false on failure.
MigrateOutputParameters
#Migrate all output parameters.
Returns: True on success, false on failure.
MigrateRecipients
#Migrate all recipients from A to B, while maintaining order.
Returns: Number of recipients migrated.
MigrateSources
#Migrate all sources from A to B, while maintaining order.
Returns: Number of sources migrated.
ReplaceInputParameters
#Move all input parameters from one component to another. Only use this function if the target component can handle the input layout of the source component.
public static void ReplaceInputParameters()
source,
Component to move parameters from.
target
Component to move parameters to.
ReplaceOutputParameters
#Move all output parameters from one component to another. Only use this function if the target component can handle the output layout of the source component.
public static void ReplaceOutputParameters()
source,
Component to move parameters from.
target
Component to move parameters to.
SwapComponents
#Replace an existing component with a different one. All parameters (input and output) will be migrated.
public static bool SwapComponents()
oldComponent,
Component current in a GH_Document.
newComponent,
Component to swap.
migrateParameters
If true, all parameters will be moved from old to new.
Returns: True on success, false on failure.
SwapComponents
#Replace an existing component with a different one. All parameters (input and output) will be migrated.
public static bool SwapComponents()
oldComponent,
Component current in a GH_Document.
newComponent
Component to swap.
Returns: True on success, false on failure.
SwapComponents
#Replace an existing component with a different one. All parameters (input and output) will be migrated.
public static IGH_Component SwapComponents()
oldComponent,
Component current in a GH_Document.
newComponentGuid,
ComponentGuid of the component to add.
migrateParameters
If true, all parameters will be moved from old to new.
Returns: Component that was added.
SwapComponents
#Replace an existing component with a different one. All parameters (input and output) will be migrated.
public static IGH_Component SwapComponents()
oldComponent,
Component current in a GH_Document.
newComponentGuid
ComponentGuid of the component to add.
Returns: Component that was added.