Grasshopper

algorithmic modeling for Rhino

hello

I wrote a gh component but i get this strange error when trying to load gh

Object: MemAssemComponent (level 1)
{
Exception has been thrown by the target of an invocation.
TargetInvocationException
}

Object: MemAssemComponent (level 2)
{
Unable to cast object of type 'Grasshopper.Kernel.Parameters.Param_Point' to type 'Grasshopper.Kernel.Parameters.Param_Number'.
InvalidCastException
}

I'm attaching the code for the component and structures.

thank you

Roey

Views: 327

Attachments:

Replies to This Discussion

You're off by one in your counting in MemAssemComponent - you're looking for a ParamNumber at pManager[0] but the first parameter you're adding is a point parameter. 

Also, just so you know, you can set default values right in the pManager.AddXXXXParameter() method - it's an optional last input.

I corrected it but still have the same problem..

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