# AdaptiveComponent.ByPoints with Python

**URL:** <https://forum.dynamobim.com/t/adaptivecomponent-bypoints-with-python/82831>\
**Category:** Developers\
**Tags:** revit, python\
**Created:** [November 7, 2022, 5:47pm UTC](https://forum.dynamobim.com/t/adaptivecomponent-bypoints-with-python/82831 "2022-11-07T17:47:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JMCiller](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jmciller/32/180272_2.png) [@JMCiller](https://forum.dynamobim.com/u/JMCiller)\
**Post date:** [November 7, 2022, 5:47pm UTC](https://forum.dynamobim.com/t/adaptivecomponent-bypoints-with-python/82831/1 "2022-11-07T17:47:52Z")

</div>

Hello everyone,

I am trying to place a 2-point adaptive family with a Python node and I am struggling with the following issue:

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

```auto
# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from System import Array
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# The inputs to this node will be stored as a list in the IN variables.
bool = IN[0]
points = IN[1]
family = UnwrapElement(IN[2])

a = []
# Place your code below this line
if bool == True:
    for i in points:
        lst = Array[Array[i]]
        b = Revit.Elements.AdaptiveComponent.ByPoints(lst,family)
# Assign your output to the OUT variable.
OUT = b

```

Does anyone know hot to solve it?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Meychik](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@Meychik](https://forum.dynamobim.com/u/Meychik)\
**Post date:** [November 8, 2022, 7:19am UTC](https://forum.dynamobim.com/t/adaptivecomponent-bypoints-with-python/82831/3 "2022-11-08T07:19:08Z")

</div>

Hi @JMCiller

as i can see you pass a family to the python script. The node AdaptiveComponent.ByPoints takes a family type not a family.

---

<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:** [November 8, 2022, 9:41am UTC](https://forum.dynamobim.com/t/adaptivecomponent-bypoints-with-python/82831/4 "2022-11-08T09:41:32Z")

</div>

@Meychik That is correct.  
Also line 31 is wrong.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/5/c564219b264acaf2fd4e0608f7828555b269d8e4.png)

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [November 8, 2022, 10:08am UTC](https://forum.dynamobim.com/t/adaptivecomponent-bypoints-with-python/82831/5 "2022-11-08T10:08:59Z")

</div>

> [@Meychik](#):
>
> The node AdaptiveComponent.ByPoints takes a family type not a family.

And a nested list of two X,Y, Z coordinates per sublist
