Draw details line on the pipe/duct center lines - multible views (loop)

Hello. I want to draw a detail line of the center line of a pipe or duct on several views - user selects the views.
I’m struggling with how to make a loop. What options are there? Which could be the easiest way to create and manage the script?

GPT 4o suggested:

  • List.Map
    I couldn’t connect these nodes so that they could be used as a function
  • Custom Node
  • Python Script

Draw details lines on the pipe center lines multible views.dyn (60.2 KB)

You’d need to show us your script in action. The base logic looks correct, so what isn’t working as you’d expect?

Also, what’s your need for this? Why not just turn on Center Lines in Visibility/Graphics Overrides? Drawing annotation lines means managing and updating any changes to duct and pipe locations. That could turn into a headache real quick.

I have a script that works with a single view. Since there are generally 40-100 views, it would make sense to create a script that can handle even more. I achieved by floor by adding blocks where I can select additional views (after view selection is a list. It’s just that I have to add the correct number of blocks each time, which is cumbersome) —if I choose views only on one floor, it works. The problem arises when selecting views from different floors, as elements from the wrong floors also appear with detail lines.

The task is to create working drawings. Since disappearing dimension lines occasionally become an issue, using detail lines helps preserve them better. Additionally, a mirrored version of these views is needed—the Revit reflected ceiling plan is unfortunately not suitable in nature. Therefore, a horizontal section is created, which we then copy and flip to achieve the desired result. By using detail lines, dimension chains are transferred more reliably from the top view to the bottom view, and later, we can further adjust the actual visibility of elements if there are any problems.

I selected 3 views (picture). I can get the pipe elements in these 3 views (3 lists) and their locations (3 lists). The next step (Curve.PullOntoPlane)


doesn’t work with the current script—I assume the problem lies with the list levels, so I’ve left that issue for later.

The goal is to get elements based on each view, essentially creating a loop. It selects the first view, retrieves the elements in that view, obtains the locations of these elements, places the elements on the level that corresponds to the first selected view, and draws detail lines for those elements. Then it moves to the next view and repeats the task for as many views as the user has selected.

Hi @HenriS is it something here ?

Revit_S9WqSy7YVr