# Marking Pipes by Diameter - Help Needed

**URL:** <https://forum.dynamobim.com/t/marking-pipes-by-diameter-help-needed/106020>\
**Category:** Revit\
**Tags:** revit, dynamo\
**Created:** [November 21, 2024, 11:26am UTC](https://forum.dynamobim.com/t/marking-pipes-by-diameter-help-needed/106020 "2024-11-21T11:26:29Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![JL.FCG](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@JL.FCG](https://forum.dynamobim.com/u/JL.FCG)\
**Post date:** [November 21, 2024, 11:26am UTC](https://forum.dynamobim.com/t/marking-pipes-by-diameter-help-needed/106020/1 "2024-11-21T11:26:30Z")

</div>

Good morning everyone!

Iv got this script very nearly done (thanks to this forum) however I’m confused about the end of it.  
Basically, takes all selected pipes from the model - filters out non default - then groups by diameter. From ‘List.OfRepeatedItem’ it seems to go wrong and i have no idea what to do! Played around with lacing and levels but just cant seem to get it work!  
Any assistance here would be greatly appreciated.  
@sovitek

 ![Create same mark value for same size pipes](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/a/ba7576406aae2f54f08404419d56d9199dd17ef8.png)

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [November 21, 2024, 11:42am UTC](https://forum.dynamobim.com/t/marking-pipes-by-diameter-help-needed/106020/2 "2024-11-21T11:42:46Z")

</div>

Hi @JL.FCG not really sure, but seems you have 15 pipes and 30 valule…and im not really sure what your codeblock do after the repeated item node

---

<div class="post-metadata">

**Author:** ![JL.FCG](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@JL.FCG](https://forum.dynamobim.com/u/JL.FCG)\
**Post date:** [November 21, 2024, 11:53am UTC](https://forum.dynamobim.com/t/marking-pipes-by-diameter-help-needed/106020/3 "2024-11-21T11:53:03Z")

</div>

After ‘List.OfRepeatedItem’ i need it to mark the same size diameter pipe as the same mark. But it seems to attempt to set parameter twice (for 200mm Dia Pipes), then 3 times (for 300mm Pipes), then 4 times (for 400mm Pipes) and i cant figure it out!

I replaced the code block with ‘Range’ and played around with lacing/levels but i think I’m missing something, still a bit of a beginner and trying my best 🙂

Would there be a better workflow for this end part in your opinion?

Iv attached the Dyn. file if that helps.

Thanks for your help  
[Create same mark value for same size pipes.dyn](https://forum.dynamobim.com/uploads/short-url/vuivU60S7nAQjVieHSCB1fvbh5r.dyn) (47.6 KB)

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [November 21, 2024, 11:59am UTC](https://forum.dynamobim.com/t/marking-pipes-by-diameter-help-needed/106020/4 "2024-11-21T11:59:19Z")

</div>

Thanks…im not at dynamo more today, but i think something here

 ![Skærmbillede 2024-11-21 125747](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/7/e71879cd412dbc43f5fb7d4228d90a4e2c39c40f.jpeg)

 ![Skærmbillede 2024-11-21 125747](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/d/fdf63ce1c80266d08dff4e0daad15f036cb5452a.png)

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [November 21, 2024, 12:29pm UTC](https://forum.dynamobim.com/t/marking-pipes-by-diameter-help-needed/106020/5 "2024-11-21T12:29:34Z")

</div>

How about this

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

[Set by Size.dyn](https://forum.dynamobim.com/uploads/short-url/Ao9u5agiMahcmFSHJMZl38mKDo7.dyn) (22.0 KB)

---

<div class="post-metadata">

**Author:** ![JL.FCG](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@JL.FCG](https://forum.dynamobim.com/u/JL.FCG)\
**Post date:** [November 21, 2024, 2:20pm UTC](https://forum.dynamobim.com/t/marking-pipes-by-diameter-help-needed/106020/6 "2024-11-21T14:20:59Z")

</div>

Thanks for this, it has help push me in the right direction.  
The output (Mark parameter in Revit) is now correct, being that 150mm Dia Pipes are Pipe Type 1, and 200mm Dia Pipes are Pipe Type 2 etc…  
However, I’m still having the same issue.  
Everything is fine up to ‘List.OfRepeatedItem’ - We start with 50 pipes, filters out 20 of them leaving 30 to be marked.  
However, when we get to ‘Range’ it the count goes up to 80 (see screenshot below)  
It seems to be counting the 1’s in the first sublist, then counting 1 & 2 in the second sublist and so on.  
Iv added the nodes from ‘List.Flatten’ to work in Dynamo Player - so we can prefix/suffix marks.  
Could you please help here?

Many thanks,

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

---

<div class="post-metadata">

**Author:** ![JL.FCG](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@JL.FCG](https://forum.dynamobim.com/u/JL.FCG)\
**Post date:** [November 21, 2024, 2:32pm UTC](https://forum.dynamobim.com/t/marking-pipes-by-diameter-help-needed/106020/7 "2024-11-21T14:32:41Z")

</div>

Thanks for your help

---

<div class="post-metadata">

**Author:** ![jasonlkw](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jasonlkw/32/191737_2.png) [@jasonlkw](https://forum.dynamobim.com/u/jasonlkw)\
**Post date:** [November 21, 2024, 4:15pm UTC](https://forum.dynamobim.com/t/marking-pipes-by-diameter-help-needed/106020/8 "2024-11-21T16:15:21Z")

</div>

Hi mate,

Try using this method.  
It’s just a matter of level control and converting from instance to element types and set param.  
Hope it works.

[Marking Elements by Size and Count.dyn](https://forum.dynamobim.com/uploads/short-url/8DvyAwktWsMlCMDzJfejQcTjE1e.dyn) (48.0 KB)

 ![Marking Elements by Size and Count_2024-11-22_12-13-49](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/c/dcc0902fb9388e439dbe33558058d3480895a2b4.png)

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [November 22, 2024, 3:50am UTC](https://forum.dynamobim.com/t/marking-pipes-by-diameter-help-needed/106020/9 "2024-11-22T03:50:00Z")

</div>

Something like this?

 ![Set by Size_2024-11-22_09-19-00](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/b/bbe602872ac0fb79e419c1a3ee97cf18ded6bada.png)

[Set by Size.dyn](https://forum.dynamobim.com/uploads/short-url/Ao9u5agiMahcmFSHJMZl38mKDo7.dyn) (22.0 KB)

---

<div class="post-metadata">

**Author:** ![JL.FCG](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@JL.FCG](https://forum.dynamobim.com/u/JL.FCG)\
**Post date:** [November 22, 2024, 8:21am UTC](https://forum.dynamobim.com/t/marking-pipes-by-diameter-help-needed/106020/10 "2024-11-22T08:21:15Z")

</div>

Will give this a go, many thanks for your help!

---

<div class="post-metadata">

**Author:** ![JL.FCG](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@JL.FCG](https://forum.dynamobim.com/u/JL.FCG)\
**Post date:** [November 22, 2024, 8:33am UTC](https://forum.dynamobim.com/t/marking-pipes-by-diameter-help-needed/106020/11 "2024-11-22T08:33:22Z")

</div>

Thanks again for this! Will take a look later today
