ladybug_rhino.command module

Functions for dealing assisting with Rhino plugin commands.

ladybug_rhino.command.add_legend_min_max_options(input_request)[source]

Add legend min and max outputs to an input request.

Parameters

input_request – A Rhino Command Input such as that obtained from the setup_epw_input function or the Rhino.Input.Custom.GetString constructor.

Returns

A tuple with two values.

  • options: The two Option objects for the legend min and max inputs.

  • values: The two values of the min and max.

ladybug_rhino.command.add_month_day_hour_options(input_request, default_inputs=(12, 21, 0, 23), sticky_key=None)[source]

Add a options for Month, Day, and Hour to an input request.

Parameters
  • input_request – A Rhino Command Input such as that obtained from the setup_epw_input function or the Rhino.Input.Custom.GetString constructor.

  • default_inputs – The default input month, day, start_hour and end_hour. A value of 0 for month or day denotes that all values of a given month, day and hour are used. For the start_hour and end_hour, the values should be between 0 and 23 where 0 denotes midnight. (Default: (12, 21, 0, 23)).

  • sticky_key – An optional sticky key, which will be used to to pull previously set values from sticky. (eg. direct_sun).

Returns

A tuple with two values.

  • mdh_options: A tuple of the Option objects for the month, day and hour inputs.

  • mdh_values: The value associated with each month, day and hour.

ladybug_rhino.command.add_north_option(input_request)[source]

Add a North option to an input request.

Parameters

input_request – A Rhino Command Input such as that obtained from the setup_epw_input function or the Rhino.Input.Custom.GetString constructor.

Returns

A tuple with two values.

  • north_option: The Option object for the North input.

  • north_value: The value of the north.

ladybug_rhino.command.add_to_document_request(geometry_name=None)[source]

Prompt the user for whether geometry should be added to the Rhino document.

Returns

A boolean value for whether the geometry should be added to the document (True) or not (False).

ladybug_rhino.command.bake_pollination_vis_set(vis_set, bake_3d_legend=False)[source]

Bake a VisualizationSet using Pollination Rhino libraries for an editable legend.

ladybug_rhino.command.current_units(lbt_data_type)[source]

Get the currently-assigned units for a given data type.

ladybug_rhino.command.import_honeybee_ui()[source]

Import Honeybee.UI.Rhino from the dll or give a message if it is not found.

ladybug_rhino.command.import_ladybug_display_schema()[source]

Import LadybugDisplaySchema from the dll or give a message if it is not found.

ladybug_rhino.command.import_pollination_core()[source]

Import Pollination.Core from the dll or give a message if it is not found.

ladybug_rhino.command.is_pollination_licensed()[source]

Check if the installation of Pollination has an active license.

ladybug_rhino.command.local_processor_count()[source]

Get an integer for the number of processors on this machine.

If, for whatever reason, the number of processors could not be sensed, None will be returned.

ladybug_rhino.command.project_information()[source]

Check if the installation of Pollination has an active license.

ladybug_rhino.command.recommended_processor_count()[source]

Get an integer for the recommended number of processors for parallel calculation.

This should be one less than the number of processors available on this machine unless the machine has only one processor, in which case 1 will be returned. If, for whatever reason, the number of processors could not be sensed, a value of 1 will be returned.

ladybug_rhino.command.retrieve_cooling_design_day_input(url_input_request, command_options, option_values)[source]

Retrieve the best cooling design day from what is available from a URL.

Parameters
  • url_input_request – The Rhino.Input.Custom.GetString object that was used to setup the URL input request. This input can be the file path to an DDY, STAT or EPW file in which case the design day is taken directly from the file. When a URL is used, the STAT file will first be searched as it typically contains values for the most accurate solar model. If no values are found there, the design day will be pulled from the DDY. If there is no clear best design day in the DDY, it will be derived from the EPW data.

  • command_options – A list of Rhino.Input.Custom.Option objects for the options that were included with the URL request. The values for these options will be retrieved along with the design day.

  • option_values – A list of values for each option, which will be updated based on the user input.

Returns

A tuple with two values.

  • design_day: A ladybug DesignDay object for the best cooling design day that was determined from the input.

  • wea: A Wea object with annual hourly data collection of clear sky radiation that represents design days throughout the year.

ladybug_rhino.command.retrieve_epw_input(epw_input_request, command_options, option_values)[source]

Retrieve an EPW input from the command line.

Parameters
  • epw_input_request – The Rhino.Input.Custom.GetString object that was used to setup the EPW input request.

  • command_options – A list of Rhino.Input.Custom.Option objects for the options that were included with the EPW request. The values for these options will be retrieved along with the EPW.

  • option_values – A list of values for each option, which will be updated based on the user input.

Returns

The file path to the EPW as a text string.

ladybug_rhino.command.retrieve_geometry_input(geo_input_request, command_options, option_values)[source]

Retrieve a geometry input from the command line.

Parameters
  • geo_input_request – The Rhino.Input.Custom.GetObject object that was used to setup the geometry input request. Note that this input does not need any filters set on it as this method will assign them.

  • command_options – A list of Rhino.Input.Custom.Option objects for the options that were included with the geometry request. The values for these options will be retrieved along with the geometry.

  • option_values – A list of values for each option, which will be updated based on the user input.

Returns

A list of geometry objects. Will be None if the operation was canceled.

ladybug_rhino.command.setup_design_day_input()[source]

Setup the request for a DDY, STAT, or EPW to get a design day.

ladybug_rhino.command.setup_epw_input()[source]

Setup the request for an EPW input and check for any previously set EPW.

ladybug_rhino.command.study_geometry_request(study_name=None)[source]

Prompt the user for study geometry that requires a grid size and offset.

Parameters

study_name – An optional text string for the name of the study (eg. Direct Sun).

Returns

A tuple with three values.

  • geometry: The Rhino Surfaces, Polysurfaces and/or Meshes that were selected.

  • grid_size: A number for the grid size that the user selected.

  • offset: A number for the offset that the user selected.