I couldn’t find a similar topic, but if you find one feel free to send it to me.
I have a building in Tekla, and one assembly not positioned in the main building. Matching a specific UDA I can work with vectors to create the movement that the assembly needs for it to be positioned correctly in the main building. I compound all the needed transformations, and apply them to the Brep with no problem at all.
Now… how can I apply that compound and transformation to the Assembly? So I can finally reposition the assembly in place in Tekla.
Below there’s a snip showing that. On the top, some of the vectors and Breps. On the bottom, the Tekla model with the assembly to be moved, highlighted. On the right, the last part of the grasshopper script.
So to clarify the assembly exists in the Tekla model, but was not created from Grasshopper?
I think moving an existing Tekla assembly would be tricky without trying to replicate Rhino’s transformations using the Tekla API in a C# component.
In some simpler cases you might be able to deconstruct the assembly (“Deconstruct Assembly”) and its contained parts (“Deconstruct Beam” etc), transform the centerlines/contours and then use the “Modify” components to apply the new inputs to the parts. But that probably wont work for all object types.
Thank you for replying. I can recreate the assembly, yes.
I have several ifc’s as reference model of assemblies. My idea was to convert those to native Tekla objects and then reposition based on the UDA.
First I tried to work with shapes instead of reference objects, but it lacks of data for it to work. Then to reposition the reference objects via GH, but I couldn’t. Later I tried converting and trying to move the assembly.
Ok, I will deconstruct the objects and apply the transformations to centrelines and contours, and recreate the assembly in place. I want to do this in bulk, for example for 100 assemblies. I will try with a couple just to check the data is not mixed up or the position of the parts don’t change.
This inspired me to try something with the API. We can call the Move (MoveObject) command from a C# component. The command won’t work directly for assemblies though, but by getting the child objects and move/orient them directly it seems doable.
So here are two C# scripting components that might help:
They should work the same way as the existing Move and Orient GH components, but act on Tekla objects.
The access type is set to “list” for the model object inputs, so for bulk operations you can have your assembly child objects in a tree structure where each branch would then match up with an item in the list of Motion vectors/Target planes.
We might include something like these components in an upcoming GH link release, they are just a little bit dangerous as they will move stuff further away each time the definition is solved - and there’s no going back other than undoing in the Tekla window.
I’ll have a look at the script and how you solved it.
Maybe the new component could have some sort of double confirmation by the user to move the objects. If the user “accept” twice to move something, It will be the user’s responsibility and not a mistake or a component fault.
I tried something that I think it will work for my goal, but I will have twice the elements:
I convert to Brep the tekla parts that I know are parts of the assembly. Then apply the transformations to the Breps to place them in position, and after that I convert them back but as Tekla Items, and with the Items I create the Assemblies. At the end I have an Assembly with all the parts in position.
It’s not an elegant approach, but I think it can work in this case.
Thank you for your time and I’m glad this triggered an idea for a new component.