Hey all,
I’m trying to create groups and then place them at different points and orientations.
I found out that Rhythm has a node called group.ByElementsAndOrigin but this only works on points and nog coordination systems.
does anybody now if its possible to make a design script (or Python code) that allows me to place the origin as coordinatesystems?
And is there a place where I could learn specific Design Script codes like this?
Why do you specifically need to use a coordinate system? Do you want to define location and orientation? If so, just place at point and then rotate. If there’s a different reason then we’d need more info to understand what your reasoning is.
It would be faster to place them and give them the right oriantation in one go.
But placing them with a point and then rotating them on that point would also work fine for me, but I can’t seem to find a way to rotate a group.
What have you tried so far? I think any node that rotates elements should work, but you will have to place and then rotate in two separate transactions.
I have tried the geometry and elements rotations of Revit, archilab, Rhythm and Clockwork.
I would love to give the Dynamo but its based on a IFC that I can’t send.
I’ll try and remake the problem that’s shareable
Screenshots are usually better anyway, so no one has to recreate your exact scenario. Just make sure everything is legible and node preview bubbles are pinned.
RotateGroup.dyn (18.0 KB)
This is basically what I have tried with multiple packages.
I think Groups don’t work like other elements. That is why I tried to look at Design Script or Python
What do the errors say? You’ll need to use a Transaction
node between placing the group and rotating it since the element won’t exist to be rotated before being placed.
Groups can be rotated just like other elements. Either way, DesignScript and Python still use the same methods as nodes. There’s functionally no difference.
I’m not sure if I get the transaction part. I have never used something in between placing and changing a element
The FamilyInstance
node won’t work since a group isn’t a family instance, but Element SetRotation
should. That’s correct for the Transaction
. Dynamo starts one transaction automatically, but you need to commit that transaction to Revit first so that you can then apply the rotation.
You can see it works for me. (I don’t have a transaction node because I already had these groups in the model.)
Open the custom node and see if you have any warnings. Do you have IronPython installed?
Doesn’t seem the give warnings and I do have IronPython.
I’ll test it out on a different computer tomorrow.
Thanks for the help!
Make sure you’re updated to the latest version of DynamoIronPython2.7. It should be 3.2 for 2025 and the latest 2.X for anything earlier.
I have tried downloading the latest versions (ironPython 2.5 because I work in Revit 2024.
Also tried it on a different PC and on Revit 2025. But it doesn’t work for me.
Do you think there is another way I could get the same result?
Try pulling the contents of the custom node out into the graph. This should just be a python node that you can then run to see whatever errors you may be getting.
It seems like it needs a Revit.Element.Group instead of Revit.Element.Category
I tried to change it but my knowledge on Python doesn’t go that far.
Still find it confusing that it works for you.
Do your testing with just a singular group before you add in multiple list levels. The python may not be setup to handle lists, but the node is. The group instance (output from PlaceInstance
) is the correct object type.
its says that “loca” is not defined.
it looks like loca is defined differently depending on what kind of element it is.
pointbased, linebased, etc.
there is a part where groups and assemplys are mentioned as tekst. So I would think a group is similar to a point based loadable familie
I think it could work if I ask for midpoint of a boundingbox as the loca and then set the rotation.
I tried doing this. but it still gives the same error. Also tried to cheat it with ChatGPT but I can’t seem to figure it out.
What kind of elements are in your group? Can you share a stripped down example file that we can test?
Also, what version of the package are you using? Have you installed the latest version?
the packages that I use are
for Revit 2024, 24.2.10.64
with Dynamo Revit 2.19.4.11865
rotate_group.dyn (13.6 KB)
rotate_group.rvt (452 KB)
For some reason your group isn’t meeting any of the conditions and is failing to create an appropriate rotation origin and transform. It would be best to dig into why your specific group is failing and what conditions need to be added, however, I added some default values (based on boundingbox) at the beginning of the code for any missing exceptions so that the code will at least do something now.
# default values for missing exceptions
box = element.get_BoundingBox(None)
loca = (box.Min+box.Max)/2
rot = 0
1 Like