# Poor result for Compare lists (point)

**URL:** https://forum.dynamobim.com/t/poor-result-for-compare-lists-point/8064
**Category:** Revit
**Tags:** revit
**Created:** [December 7, 2016, 4:22pm UTC](https://forum.dynamobim.com/t/poor-result-for-compare-lists-point/8064 "2016-12-07T16:22:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Alain\_Hamel](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@Alain\_Hamel](https://forum.dynamobim.com/u/Alain_Hamel)
#### Post date: [December 7, 2016, 4:22pm UTC](https://forum.dynamobim.com/t/poor-result-for-compare-lists-point/8064/1 "2016-12-07T16:22:32Z")

</div>

Hello,  
My goal, to insert a family following a given point, unless there is already a family to be point.  
I want to know if elements already exist in a view (using their coordinates).  
I use the SetDifference node, but the result is not correct.  
In my example:  
A) the list of points where I should insert a family  
B) The list of points where there is already a family  
C) The difference between the two lists, except that the point x = -24203.468, y, z is too much in the result.  
Where is the problem ?

\*\* French  
Bonjour,  
Mon but, insérer une famille suivant un point donné, sauf si il y a déjà une famille à se point.  
Je cherche à savoir si des éléments existent déjà dans une vue (en utilisant leurs coordonnées).  
J’utilise le nœud SetDifference, mais le résultat n’est pas correct.  
Dans mon exemple :  
A) la liste des points ou je devrais insérer une famille  
B) La liste des point ou il y a déjà une famille  
C) La différence entre les 2 listes, sauf que , le point x=-24203.468,y,z est de trop dans le résultat.  
Ou est le problème ?

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/3/238b6c06999ae23af9a2032c9854a74ea84d8bfd.png)

---

<div class="post-metadata">

### Author: ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)
#### Post date: [December 7, 2016, 4:25pm UTC](https://forum.dynamobim.com/t/poor-result-for-compare-lists-point/8064/2 "2016-12-07T16:25:22Z")

</div>

> [@Alain\_Hamel](#):
>
> I want to know if elements already exist in a view (using their coordinates).

Hi @Alain_Hamel

Try using Geometry.DoesIntersect node.

---

<div class="post-metadata">

### Author: ![Alain\_Hamel](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@Alain\_Hamel](https://forum.dynamobim.com/u/Alain_Hamel)
#### Post date: [December 7, 2016, 4:35pm UTC](https://forum.dynamobim.com/t/poor-result-for-compare-lists-point/8064/3 "2016-12-07T16:35:31Z")

</div>

Hi,  
The problem is that list A is not yet an element, but a list of points

---

<div class="post-metadata">

### Author: ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)
#### Post date: [December 7, 2016, 4:55pm UTC](https://forum.dynamobim.com/t/poor-result-for-compare-lists-point/8064/4 "2016-12-07T16:55:26Z")

</div>

@Alain_Hamel Round off coordinate values and reconstruct the points.  
Will try to explain the issue below…  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/2/124d4eeb167db79b76cdcb31ade1d82882076be2.png)

Using some design script for the same may be a lot more convenient  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/b/2b530fe9ddad9e738764e4edc688368eb067d956.png)

`Point.ByCoordinates(Math.Round(p.X,3),Math.Round(p.Y,3),Math.Round(p.Z,3));`

---

<div class="post-metadata">

### Author: ![Alain\_Hamel](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@Alain\_Hamel](https://forum.dynamobim.com/u/Alain_Hamel)
#### Post date: [December 7, 2016, 5:17pm UTC](https://forum.dynamobim.com/t/poor-result-for-compare-lists-point/8064/5 "2016-12-07T17:17:12Z")

</div>

Hi,  
A big thank you, it works 🙂
