Grasshopper

algorithmic modeling for Rhino

I'm using normal sintax to build my plugins icons (VB) .I add my icon (24x24 PNG image maked with Illustrator and Photoshop) to resources and then I add this lines to my code: 

 

[...]

Protected Overrides ReadOnly Property Internal_Icon_24x24 As Bitmap        

Get            

Return My.Resources.icon    

End Get    

End Property

End Class

 

 

No errors in compilation, but icon and tab doesn't in GH but the plugin loads correctly.

 

I'm using Visual Studio 2010.

 

Best Regards.

 


 

Edit:

 

The solution to this problem is to compile GHA libraries against the .NET framework 3.5 or lower. Grasshopper is Rhino4 compatible meaning .NET 4.0 or higher will not work.

Views: 2032

Replies to This Discussion

Hello,

Even I had the same problem while coding in C# via Visual Studio 2010 with .NET 4.0.
But for some odd reason, the following code seems to work:

 

protected override Bitmap Icon  //or Internal_Icon_24x24 instead of Icon

{        

get         

{         

return new Bitmap("C:/...blah.../Resources/TU_P1_color.png"); //basically the full file path      

}       

}

 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service