Marking Pipes by Diameter - Help Needed

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

1 Like

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

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 :slight_smile:

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 (47.6 KB)

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

1 Like

How about this

Set by Size.dyn (22.0 KB)

2 Likes

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,

Thanks for your help

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 (48.0 KB)

Something like this?

Set by Size.dyn (22.0 KB)

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

Thanks again for this! Will take a look later today