Grasshopper

algorithmic modeling for Rhino

Hi,

I'm looking to pass a COM object from component to component - I'm creating custom components for this in VB.NET.  The COM object is defined in a referenced library, and I am packaging it up in a GH_ObjectWrapper to get it to the next component.

I am however stuck on how to unpack it from the GH_ObjectWrapper type.  Once I have brought the GH_ObjectWrapper type into my next SolveInstance, how do I cast it to my special com object type again?

Thanks

Zak

Views: 707

Replies to This Discussion

You can use the Value property, but you will have to cast the result to your actual type.

Dim comObject As ComObjectType = TryCast(objectWrapper.Value, ComObjectType)

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service