Grasshopper

algorithmic modeling for Rhino

Dear GHA developers,

as you may have noticed, Grasshopper 0.7 now support loaded library icons on the banner:


In order to have your GHA library participate with this, you must declare a public class in your project (make sure you supply a constructor with no arguments!) of type Grasshopper.Kernel.GH_AssemblyInfo


This is an abstract class with a bunch of overridable readonly properties. If you override all the fields (especially AssemblyName and AssemblyIcon) your project will be included on the banner. You should supply a 24x24 pixel image.


Here's a typical VB.NET implementation:


<code>Public Class GH_GrasshopperLibraryInfo

  Inherits GH_AssemblyInfo


  Public Overrides ReadOnly Property AssemblyName() As String

     Get

       Return "MyGHALibrary"

    End Get

  End Property

  Public Overrides ReadOnly Property AssemblyDescription() As String

    Get

      Return "My Tools for Grasshopper"

    End Get

  End Property

  Public Overrides ReadOnly Property AssemblyVersion() As String

    Get

      Return "1.0.0.0"

    End Get

  End Property

  Public Overrides ReadOnly Property AssemblyLicense() As GH_LibraryLicense

    Get

      Return GH_LibraryLicense.beta

    End Get

  End Property

  Public Overrides ReadOnly Property AssemblyIcon() As System.Drawing.Bitmap

    Get

      Return My.Resources.MyLibraryIcon

    End Get

  End Property


  Public Overrides ReadOnly Property AuthorName() As String

    Get

      Return "My Company inc."

    End Get

  End Property

  Public Overrides ReadOnly Property AuthorContact() As String

    Get

      Return "http://www.MyGrasshopperTools.com"

    End Get

  End Property

End Class</code>


The AuthorContact field support multi-line strings, so feel free to add addresses, emails, phone numbers etc. etc.


--

David Rutten

david@mcneel.com

Poprad, Slovakia


Views: 1192

Replies to This Discussion

Hey David, I will try to implement this...one question, until now I only see a + character on the splash screen. Am I supposed to press that to see the icons? Is there a toggle somewhere?
Try Help > About... > toggle the "+" sign and gaze away!

Nice!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service