More specific, I would like to move this point to a specific xyz-location. I made a family in which the 8 corner points are all adaptive. However, in Dynamo i cannot find any way to move the points. I tried the following:
thanks for your answer. I am trying to avoid placing a new family instance. Instead, I would like to modify the existing element. Do you know if this is possible?
Hi Viktor,
I tested this script and it works perfectly to move one point, thanks for sharing! I am trying to update the python code to move multiple points at the same time. For some reason it is not working with a for statement. Could you kindly advise on this please?
Thanks,
Sergio
Well in the example I am indeed showing how to move one point.
I don’t see any reason why it wouldn’t work with a for statement, but feel free to share what you’ve done and I’ll take a look
You have to apply the UnrwapElement and ToXyz functions to each element in the list.
You can do so by putting them inside the for cycle.
Apart from that the first for cycle in your code starts with an indentation that doesn’t match the structure of the code - you can remove the tab there, 1 tab in the following line, two tabs at 26, 27 and 28
trans =
for i,j in zip(pnt,pt):
trans.append(i.Subtract(j.Position))
outList=
for k,l in zip(pnt, trans)
outList.append(ElementTransformUtils.MoveElement(doc, k.Id, l))