# Edge References - Python Code troubles

**URL:** <https://forum.dynamobim.com/t/edge-references-python-code-troubles/77905>\
**Category:** Revit\
**Created:** [June 22, 2022, 8:47pm UTC](https://forum.dynamobim.com/t/edge-references-python-code-troubles/77905 "2022-06-22T20:47:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerhard.p](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gerhard.p/32/147675_2.png) [@gerhard.p](https://forum.dynamobim.com/u/gerhard.p)\
**Post date:** [June 22, 2022, 8:47pm UTC](https://forum.dynamobim.com/t/edge-references-python-code-troubles/77905/1 "2022-06-22T20:47:10Z")

</div>

Hello Dynamo Friends 🙂

At automatic dimensioning i sometimes get in trouble because some Elements don´t give references and that will mess up the whole graph. So i want to filter out all Elements that don´t give references by creating a bool list that i also need for filtering views, columns and so on later.

I use the node from @Alban_de_Chasteigner, my bad he built in that great function to filter out all elements that give none results. Cant create a boll list like that. I tried to edit the code to remove this filter function but i failed many times and so i ask for help.

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

> <https://github.com/albandechasteigner/GeniusLociForDynamo/blob/master/Nodes/Compound%20Edges%20References.dyf#L6-L56>

I tried that:

```auto
if isinstance(IN[0], list): OUT = allHorizEdges, allHorizReferences, allVertEdges), allVertReferences
else: OUT = allHorizEdges[0], allHorizReferences[0], allVertEdges[0], allVertReferences[0]

```

And that gives now empty lists for elements that gave references before…so i just made it worse 😃  
Happy about any advice!

---

<div class="post-metadata">

**Author:** ![gerhard.p](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gerhard.p/32/147675_2.png) [@gerhard.p](https://forum.dynamobim.com/u/gerhard.p)\
**Post date:** [June 22, 2022, 9:54pm UTC](https://forum.dynamobim.com/t/edge-references-python-code-troubles/77905/2 "2022-06-22T21:54:53Z")

</div>

Looks like i could solve that with list map

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