Executing external .gh from another definition

Hi,
I have two separate .gh files needed for a multi-step procedure. Getting more specific, the first one is genarating some views of the model (cross sections, elevations etc with VisualArq) and the second one is reading the layers of the views (they are blocks) with elefront and matches some curves to the needed layers. The second .gh file, is really large and has many clusters inside.

What I would need is:
1)execute the first one, genarate views after reading the opened .3dm and get the layer names of the views
2)pass those layer names in the second .gh file, read from the same .3dm the views and export the matched curves to .dwg. The second .gh file is gonna be executed n-times when n is the number of generated views

How can I “call” another .gh from inside the first one and have the needed result without merging the two into one file?
Thanks in advance

***The image below is about the 2nd gh file (the large one) with numerous clusters inside

Have a look here :

Hi -

Sounds like you should be able to use a Hops component - see more here:
https://discourse.mcneel.com/t/about-the-hops-category/
-wim

Hi,

Thank’s for your answer, Hops would have been a great solution. But it seems not to be working with object referenced by id. The reference is not retrieve within Hops.

To use blocks in Grasshopper it is quite usefull to consider their ids.

Furthermore, It is impossible to have some script interacting with Rhino interface.

The Runner.gh script above is working with both ids and python code.

An example


blockCount6.ghx (75.5 KB)
grasshopperCache4.ghx (56.3 KB)

Hi Gaspard -

Grasshopper 1 doesn’t support blocks with any native components. Hops will not add functionality beyond that what is natively supported in Grasshopper.
-wim

1 Like