Development: Leap Year button for analysis period

Hi @chris

I hope you’re doing well.

I was wondering if it’s possible to have is_leap_year as an input for the LB Analysis Period in the component, with the option to toggle it on or off via a button.

Thank you very much for your time and assistance.

Sincerely,
Behnam

1 Like

Hey @behnammmohseni ,

This is a reasonable request since it is important for working with AMY EPW files for leap years and it’s also really straightforward to implement given that the AnalysisPeriod object in the SDK already has a fully-functioning is_leap_year property on it.

When you see features like this that are fully supported in the SDK but not exposed on an official component, it’s because we thought that exposing it might make the components more complex and therefore make it harder for new users to understand and get started with the components. For advanced users like yourself, you can always just open up a GHPython component and edit the AnalysisPeriod object to be for a leap year if you needed to.

Granted, I understand it can get annoying if you find yourself constantly having to make GHPython components. If this is what is going on, then I concede that adding one more input to the component isn’t really going to overwhelm and new user. So we can add it.

But I’m just trying to explain why every feature of the Ladybug Tools SDK isn’t exposed on a Grasshopper component since that would be pretty overwhelming for new users.

1 Like