Pass Blocks into Python

I cannot seem to use blocks like standard geometry.

The rectangle goes in (type of geometry: rectangle) but the block has “none” type and does not print any meaningful representation.

Is there a way to do this?

-Steve

Grasshopper does not have support for managing blocks (as like hatches and other stuff).
Your “Block” component is probably from a plugin.

Via script you cannot use that block output directly (or at least it would be more complex), but you could search on the rhino file for a particularly named block and then work from there… if the block already exist, if it was already baked once.

Hi @customgamebits,

Just wondering whether instead of bringing the block into python you could DeBlock it and bring the component elements into python, then reconstruct the block from python output?

HTH
Jeremy

Thanks, Riccardo & Jeremy for your quick and helpful responses.

Yes, a rethink is required. The block problem is illustrated with a local block but in fact I am using a library of 14 linked blocks in this project. Using Python was an attempt to streamline things. But without native support for Blocks, this will be more complex.

I have tried Elefront and Hetoptera + Instance manager and I cannot seem to make them work very well.

Perhaps this can be added to the list of feature requests for future version of GH?

Once again, thanks for your time!

1 Like