# Moving adaptive points with Dynamo

**URL:** https://forum.dynamobim.com/t/moving-adaptive-points-with-dynamo/37938
**Category:** Revit
**Created:** [July 4, 2019, 6:49am UTC](https://forum.dynamobim.com/t/moving-adaptive-points-with-dynamo/37938 "2019-07-04T06:49:33Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Marijn](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@Marijn](https://forum.dynamobim.com/u/Marijn)
#### Post date: [July 4, 2019, 6:49am UTC](https://forum.dynamobim.com/t/moving-adaptive-points-with-dynamo/37938/1 "2019-07-04T06:49:33Z")

</div>

Hi everyone,

I’m trying to modify the location of cornerpoints of a concrete base block in Revit:

 ![Move%20cornerpoint](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/f/1f5e3d486d5bfaf4cd0f14b2a47c79fcaa2ea676.png)  
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:  
 ![Dynamo](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/e/febb2f4e910451f265f5b391242b3b930350a79c.png)  
Does anyone have an idea?

---

<div class="post-metadata">

### Author: ![ingenieroahmad](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ingenieroahmad/32/72992_2.png) [@ingenieroahmad](https://forum.dynamobim.com/u/ingenieroahmad)
#### Post date: [July 4, 2019, 6:59am UTC](https://forum.dynamobim.com/t/moving-adaptive-points-with-dynamo/37938/2 "2019-07-04T06:59:31Z")

</div>

Try the below simple script along with the result in screenshot.

 ![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/0/00f6cc2ed546a7af1d5063e68aafa2ff01089e58.png) ![2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/6/f6651b2138c65e16263d34786fea4dde22a0ce25.png)

---

<div class="post-metadata">

### Author: ![Marijn](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@Marijn](https://forum.dynamobim.com/u/Marijn)
#### Post date: [July 4, 2019, 7:52am UTC](https://forum.dynamobim.com/t/moving-adaptive-points-with-dynamo/37938/3 "2019-07-04T07:52:05Z")

</div>

Hi Ahmad,

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?

---

<div class="post-metadata">

### Author: ![ingenieroahmad](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ingenieroahmad/32/72992_2.png) [@ingenieroahmad](https://forum.dynamobim.com/u/ingenieroahmad)
#### Post date: [July 4, 2019, 7:57am UTC](https://forum.dynamobim.com/t/moving-adaptive-points-with-dynamo/37938/4 "2019-07-04T07:57:14Z")

</div>

I Think in case of adaptive family dynamo deals with it’s location as one point “Generic Family” So set Location is not useful way to deal with.

IF anyone else has another idea we will appreciate it.

---

<div class="post-metadata">

### Author: ![viktor\_kuzev](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/viktor_kuzev/32/48254_2.png) [@viktor\_kuzev](https://forum.dynamobim.com/u/viktor_kuzev)
#### Post date: [July 4, 2019, 10:22am UTC](https://forum.dynamobim.com/t/moving-adaptive-points-with-dynamo/37938/5 "2019-07-04T10:22:27Z")

</div>

Something to get you started:  
refer to this post to find which adaptive points belong to which family:

> [@Listing Adaptive Component Placement point Locations](https://forum.dynamobim.com/t/listing-adaptive-component-placement-point-locations/3980):
>
> I have a 4 point adaptive component that is applied to a divided surface, I was just wondering if there was a way of identifying all of the individual panels and then listing all of the placement point in xyz coordinates for each component? I am able to list all of the adaptive components and there insertion point (which is the 1st placement point), I just need to get access to all of the placement points. As always, I would appreciate any help.

And this is a start for the actual moving. It is currently just moving one of the adaptive points:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/a/9a9a8b1e7f2045bf945a948a95483daa281a6436.png)

I’m using a method from the RevitAPI to move the point.  
I don’t know if there’s a package that has implemented that method into a node.

---

<div class="post-metadata">

### Author: ![Sergio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sergio/32/106789_2.png) [@Sergio](https://forum.dynamobim.com/u/Sergio)
#### Post date: [September 21, 2020, 1:51pm UTC](https://forum.dynamobim.com/t/moving-adaptive-points-with-dynamo/37938/6 "2020-09-21T13:51:45Z")

</div>

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

---

<div class="post-metadata">

### Author: ![viktor\_kuzev](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/viktor_kuzev/32/48254_2.png) [@viktor\_kuzev](https://forum.dynamobim.com/u/viktor_kuzev)
#### Post date: [October 12, 2020, 8:58pm UTC](https://forum.dynamobim.com/t/moving-adaptive-points-with-dynamo/37938/7 "2020-10-12T20:58:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Sergio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sergio/32/106789_2.png) [@Sergio](https://forum.dynamobim.com/u/Sergio)
#### Post date: [October 13, 2020, 9:13am UTC](https://forum.dynamobim.com/t/moving-adaptive-points-with-dynamo/37938/8 "2020-10-13T09:13:54Z")

</div>

Hi Viktor,

Thanks for the replay. Sure, find here an image of my code and also my dynamo script where I try to move 4 adaptive points to 4 different locations.

[Move Adaptive Point\_Multiple.dyn](https://forum.dynamobim.com/uploads/short-url/xMXekGb9RHvwatit3IZco4cgrzc.dyn) (26.0 KB)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/9/494a9ab10b79d81541a2818bd9934d913e44e141.png)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/8/78ec035eed5609a13525951e268d3ade91c73a7a.png)

Regards,  
Sergio

---

<div class="post-metadata">

### Author: ![viktor\_kuzev](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/viktor_kuzev/32/48254_2.png) [@viktor\_kuzev](https://forum.dynamobim.com/u/viktor_kuzev)
#### Post date: [October 21, 2020, 2:12pm UTC](https://forum.dynamobim.com/t/moving-adaptive-points-with-dynamo/37938/9 "2020-10-21T14:12:11Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Carlos\_Montellano](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/carlos_montellano/32/18609_2.png) [@Carlos\_Montellano](https://forum.dynamobim.com/u/Carlos_Montellano)
#### Post date: [September 15, 2021, 11:43am UTC](https://forum.dynamobim.com/t/moving-adaptive-points-with-dynamo/37938/10 "2021-09-15T11:43:55Z")

</div>

Hi, I’m having this problem right now, made the corrections you suggested but somehow it keeps me saying: “unexpected token ‘’”

Any ideas on what may be wrong?

Here a picture:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/e/de691e28a274d5153671fb863eddde26c7358a47.png)

And my corrected code:

#Enable Python support and load DesignScript library  
import clr

clr.AddReference(“RevitServices”)  
import RevitServices  
from RevitServices.Persistence import DocumentManager  
from RevitServices.Transactions import TransactionManager  
doc = DocumentManager.Instance.CurrentDBDocument

clr.AddReference(“RevitNodes”)  
import Revit  
clr.ImportExtensions(Revit.Elements)  
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference(“RevitAPI”)  
from Autodesk.Revit.DB import \*

pnt = UnwrapElement(IN[0])  
pt = UnwrapElement(IN[1].ToXyz())

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))

OUT = outList

---

<div class="post-metadata">

### Author: ![viktor\_kuzev](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/viktor_kuzev/32/48254_2.png) [@viktor\_kuzev](https://forum.dynamobim.com/u/viktor_kuzev)
#### Post date: [September 17, 2021, 1:16pm UTC](https://forum.dynamobim.com/t/moving-adaptive-points-with-dynamo/37938/11 "2021-09-17T13:16:53Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/4/74f383a6afe8210266d824465e16476651b76cc2.png)  
Use that to paste formated text here.
