algorithmic modeling for Rhino
Hi Guys,
I am starting to create a custom 0.7 grasshopper component with Visual Basic 2010 Express following the guide from Ben Sitler.
Most stuff is working fine but my custom Icon is not properly showing up in Grasshopper. There is just a transparent hole where it should be (in tab menu & on the component box & etc).
I listed a schematic/simplified version of my component below. The icon was added to the project resource file and with the name 'ICON'.
The mentioned guide is supposed to be for 0.6 ... might that be the problem and i have to register the custom icon differently?
Thank you for your help
Ciao
KT
-----
Imports Grasshopper.Kernel
Imports Grasshopper.Kernel.Types
Public Class MyClass
Inherits Grasshopper.Kernel.GH_Component
Public Sub New()
MyBase.New("ButtonName", "Abbreviation", "Description", "TabName", "SubTabName")
End Sub
Protected Overrides Sub RegisterInputParams(ByVal pManager As GH_InputParamManager)
pManager.Register_SurfaceParam("Surface", "S", "Surface", GH_ParamAccess.item)
End Sub
Protected Overrides Sub RegisterOutputParams(ByVal pManager As GH_OutputParamManager)
pManager.Register_SurfaceParam("Surface", "S", "Surface")
Protected Overrides Sub SolveInstance(ByVal Da As IGH_DataAccess)
Dim Surface As Rhino.Geometry.Surface
Da.GetData(Of Rhino.Geometry.Surface)(0, Surface)
[...Component Code...]
Da.SetData(0, Surface)
Tags:
I have a little diferent problem here, if I add the lines with (in correct place):
Protected Overrides ReadOnly Property Internal_Icon_24x24() As System.Drawing.Bitmap
Get
Return My.Resources.ICON
End Get
End Property
Then the working plugin is no more in GH tabs. If I delete this lines everything works fine and I have my plugin with its custom tabs, etc.
Hi Angel,
did you put a breakpoint on that line (Return My.Resources.ICON)? Is there an exception that gets thrown when you hit it?
--
David Rutten
david@mcneel.com
Poprad, Slovakia
No exception, no breakpoint...:S...
I have not read your answer here and I just created a new post, sorry. We could stay here or go to new post, whatever you want.
http://www.grasshopper3d.com/forum/topics/i-cant-add-icons-to-my-pl...
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by