Setting type hints in a Python component

Hey everyone,

I’m trying to specify the type hints of Python. So far I got to the point where I can access the type hint information with:


Which holds a GhPython.Component.GhDocGuidHint object. How do I choose the GhPython.Component.GhDocGuidHint so it becomes the type hint I want?


Hi Christian

if you are attempting this from a scripting component, this won’t work. You must do this from an external (outside-of-solution-time) dialog or ‘moment’.

Can you tell more about the problem or issue you are trying to solve?



Giulio Piacentino
for Robert McNeel & Associates

Hi Giulio,

I’m trying to make a component that packs a mesh into a dict, together with some data, then sends it to a second component which unpacks and joins the mesh.

To join the meshes I’m using:

import rhinoscriptsyntax as rs

In the first component, where the dict are packed, the meshes are transformed with:


before they are send to the next component.

If I don’t transform them, then JoinMesh won’t work.
If I don’t set the type hints to mesh then JoinMesh returns None.

I have attached a gh file with the components: Type (7.0 KB)


Hi Christian,

this is how you should set-up this type of exchange through custom classes: (24.4 KB)

You should just check the right type hint. This is not a Python requirement, this is so that your script works correctly with the rest of Grasshopper.



Giulio Piacentino
for Robert McNeel & Associates