# Filter rebar by shape

**URL:** <https://forum.dynamobim.com/t/filter-rebar-by-shape/78863>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [July 20, 2022, 9:35am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863 "2022-07-20T09:35:47Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![technitutors](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@technitutors](https://forum.dynamobim.com/u/technitutors)\
**Post date:** [July 20, 2022, 9:35am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/1 "2022-07-20T09:35:48Z")

</div>

Hi All. Ive got a fairly easy code but The get parameter Im still trying to wrap my head around. I need it to select only bars of shape LL. Now its not doing anything.

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

---

<div class="post-metadata">

**Author:** ![Mark.Ackerley](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mark.ackerley/32/79310_2.png) [@Mark.Ackerley](https://forum.dynamobim.com/u/Mark.Ackerley)\
**Post date:** [July 20, 2022, 9:57am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/2 "2022-07-20T09:57:14Z")

</div>

Hi,

I’d have a look at the output of your ‘get parameter node’…

I’m guessing the output will say “LL” but it’s worth checking.

My suspicion would be that the LL is actually a Family Type, whereas you are checking for a String with your Equality test.

There is an ‘Object Type’ node in Dynamo that lets you check what sort of data is coming out of a node… If you plug that in and it says “String” then you’ll know you can check for it, if it says “Type” then you can add a “String from Object” node to convert the data into a Type which will work with your Equality test.

Hope that helps,

Mark

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/6/f61d31a5ff77d0a8c61146d2bcbf55e7c7056bf8.png)

---

<div class="post-metadata">

**Author:** ![technitutors](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@technitutors](https://forum.dynamobim.com/u/technitutors)\
**Post date:** [July 20, 2022, 10:12am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/3 "2022-07-20T10:12:33Z")

</div>

so is there a way to filter by family type and not parameter? I just want to filter the list so it only displays bars of shape LL

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/6/16c8d2d8c4961e8f04a1f2cc258d9818e6dc5623.png)

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [July 20, 2022, 10:49am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/4 "2022-07-20T10:49:47Z")

</div>

Hello, put a watch at the output of your ElementgetValueByname node

Cordially  
christian.stan

---

<div class="post-metadata">

**Author:** ![technitutors](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@technitutors](https://forum.dynamobim.com/u/technitutors)\
**Post date:** [July 20, 2022, 10:54am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/5 "2022-07-20T10:54:10Z")

</div>

see below

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

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [July 20, 2022, 11:03am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/6 "2022-07-20T11:03:38Z")

</div>

Try plugging in like this to see what type of data to send to it

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

Cordially  
christian.stan

---

<div class="post-metadata">

**Author:** ![Mark.Ackerley](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mark.ackerley/32/79310_2.png) [@Mark.Ackerley](https://forum.dynamobim.com/u/Mark.Ackerley)\
**Post date:** [July 20, 2022, 11:11am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/7 "2022-07-20T11:11:15Z")

</div>

Once you have the Family Type, you can get it’s Name value and test that? 🙂

---

<div class="post-metadata">

**Author:** ![technitutors](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@technitutors](https://forum.dynamobim.com/u/technitutors)\
**Post date:** [July 20, 2022, 11:11am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/8 "2022-07-20T11:11:35Z")

</div>

giving errors

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

---

<div class="post-metadata">

**Author:** ![technitutors](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@technitutors](https://forum.dynamobim.com/u/technitutors)\
**Post date:** [July 20, 2022, 11:20am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/9 "2022-07-20T11:20:03Z")

</div>

well the family type is LL. But how do I get it to select just the rebar of type LL? , I just dont know the correct node or syntax for it. In the project its listed as a parameter  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/3/c31ca327fbdadd5e2332b22f722d7d0af534c983.png)

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

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [July 20, 2022, 11:22am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/10 "2022-07-20T11:22:08Z")

</div>

Put x[0]  
we must know the type of parameter 59 (I would go for a number 1 2 3)

Cordially  
christian.stan

---

<div class="post-metadata">

**Author:** ![technitutors](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@technitutors](https://forum.dynamobim.com/u/technitutors)\
**Post date:** [July 20, 2022, 11:35am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/11 "2022-07-20T11:35:38Z")

</div>

thats what Im doing and its giving errors

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

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [July 20, 2022, 11:39am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/12 "2022-07-20T11:39:22Z")

</div>

I’m blocking, sorry I can’t do more

Cordially  
christian.stan

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [July 20, 2022, 11:52am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/13 "2022-07-20T11:52:33Z")

</div>

Look at the parameters available after pulling the shape parameter - those Element Types will expose the LL value if you ask them for the right info.

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [July 20, 2022, 12:25pm UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/14 "2022-07-20T12:25:19Z")

</div>

![20 juillet capture ecran](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/3/a358efe892e8ca491ebca76390bd462084f1bb8b.png)

Cordially  
christian.stan

---

<div class="post-metadata">

**Author:** ![technitutors](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@technitutors](https://forum.dynamobim.com/u/technitutors)\
**Post date:** [July 21, 2022, 4:29am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/15 "2022-07-21T04:29:48Z")

</div>

Almost there. The problem now is it is not selecting multiple rebars. It only selects one

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

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [July 21, 2022, 6:25am UTC](https://forum.dynamobim.com/t/filter-rebar-by-shape/78863/16 "2022-07-21T06:25:47Z")

</div>

Hello  
CodeBlock

```auto
Val;
GL;
KL;
a=KL.Name==Val?1:0;
Rep=DSCore.List.IndexOf(a,1);
GL[Rep];

```

I’m on phone

edit:

 ![20 juillet forum anglais_2022-07-21_11-12-29](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/4/c468bbe2bee5cba130443279ca1667b12ed89eb2.png)  
This should answer  
Best wishes

Cordially  
Christian.stan
