Get Block Transformation info in GH?

Hi I am trying to access the transformation matrix from blocks in Grasshopper. (Many blocks in the scene. Some block rotations are not at 30 degree increment so I want to fix that in GH)

I imported blocks instances into GH with Elefront plugin (it doesnt has trans matrix info function). I am planning to get the matrix in c#, round the XY rotation to 30 degree, and create the new instances with correct transformation. I was reading this post

Menno’s Rhino macro uses InstanceObject.InstanceXform
How can I get that in GH C#? Thanks

Hi @lmnoc1

If you are using R7, the new version of eleFront has a block info component that should give you the transformation.

Let me know if something is off.

For Instance References do something like this:

1 Like

If you’re using Rhino 8, you can use some of the new Block components to get the transforms for each instance. Something like this. (8.3 KB)


Thanks. I thought I just download it. But looks like it got an upgrade yesterday. Did you upload it just for me? :blush: Looks great!

Screenshot 2023-02-16 134427

Edit: The Block Container (for referencing instances) seems to be missing in beta, no reaction after right click Set Multiple Blocks. You should make it a standalone component. I can’t find it so I normally extract parameter to get it in 4.2.2. Also the 4.2.2 version Deconstruct Block has a plane output which is quite nice