ladybug_rhino.versioning.legacy module

Functions for updating from Legacy to LBT.

ladybug_rhino.versioning.legacy.insert_new_native_gh_component(new_comp_id, component, doc)[source]

Insert a new native Grasshopper component in the Grasshopper doc.

Parameters
  • new_comp_id – The GUID of the native grasshopper component to be inserted.

  • component – The outdated component where the userobject will be inserted next to.

  • doc – The Grasshopper document object.

ladybug_rhino.versioning.legacy.insert_new_user_object(user_object, component, doc)[source]

Insert a new user object next to an existing component in the Grasshopper doc.

Parameters
  • user_object – A Grasshopper user object component instance.

  • component – The outdated component where the userobject will be inserted next to.

  • doc – The Grasshopper document object.

ladybug_rhino.versioning.legacy.mark_component(doc, component, note=None)[source]

Put a circular red group around a component and label it with a note.

Parameters
  • doc – The Grasshopper document object.

  • component – A Grasshopper component object on the canvas to be circled.

  • note – Text for the message to be displayed on the circle.

ladybug_rhino.versioning.legacy.suggest_new_component(component, updating_component)[source]

Drop a suggested LBT component on the canvas for an input Legacy LB+HB component.

This includes circling the component in red if it is a Legacy component, adding the a message to this red circle (if applicable), identifying the suggested LBT component in the LADYBUG_MAP and HONEYBEE_MAP (if it exists), and dropping an instance of the new LBT component next to the Legacy component.

Parameters
  • component – A Grasshopper legacy component object on the canvas for which a LBT component will be suggested.

  • updating_component – An object for the component that is doing the updating. This will be used to give warnings and access the Grasshopper doc. Typically, this can be accessed through the ghenv.Component call.