Get BlockReference and Rotate it

Hi everybody

i have some 3D dynamic block and i want to rotate them from Z axis.
i dont want to creat the bloc just get them and rotate them.
i tried by geometryrotate node but it doesn’t work.

thank

Hi @dr.hybride,

Do you mean inside the Block to rotate it?

No just rotate (outside the block)

@dr.hybride try this. ObjectExtensions.SetParameterByName is from the Civil 3D Toolkit.

2 Likes

tkank you
but my block has a different origine.

So you are wanting to rotate around a point that is not the origin of the block reference coordinate system?

Exactly

Could you send an example of what you’re trying to do?

Is the rotation point always in the same location relative to the origin? You could add a rotation parameter to the dynamic block that is offset from the origin and then set the angle property in Dynamo.

1 Like

Like this? Or do you want the entire block reference (including the base point) to rotate around the axis of rotation?

2 Likes

thank you for your help.
for 3 days i tried to resolve this problem but i fail ,dynamo make me sick lol

the workflow is to insert reference block by coordinate or by sytemecoordinate either by exctracting in civil 3D (X,Y,Z and rotation) or by dynamo (getting systemecoordinate) the 2D block but my problem is that my 3d dynamic block has not the same origin (see the picture N1

and what i want is like thisimage001(1)

off course i tried to rotate by the node (systemecoordinate.rotate) but it doesnt work (see the attached script

so i’ve had idea : i created in civil 3d ,i rotated the block by the command 3D rotate and re-created the same block and when i explod the first block for refind the origin block (with the parameters); dynamo explode whole block and created a new block *U22 and i lost all the parameters.

i dont know if you enderstood me?

it is the good idea. i’ll try
thank you mister jensen

yes i want to rotate the entire block reference around the axis. do you have ann idea ?

Can you upload a DWG?

portal beam.dwg (711 KB)

@dr.hybride like this?

2 Likes

YESSSSSSSSSSS

you are the best.

can you give the script ?

Sure, here you go :+1:

BlockRotation.dyn (29.5 KB)