Generating detail lines (.from curve) automatically on multiple views

Another day, another dynamo challenge!

Detail lines have to be generated on top of walls AND in the same view in which these walls are visible. I want to be able to do this for ALL my floor plan views at the same time. I already managed to this succesfully for a SINGLE view. However, on large projects we often have 10+ floor plan views per project. Ideally, I do not want to manually run the script 10+ times for each project. I would like to use the node ‘Get All Views’ from archilab package. Unfortunately, it does not seem to be so simple as to replacing my ‘active view’-node with the ‘get all views’-node :S.

Now, I have generated a list consisting of 13 sublists, which contain the elements/walls per floor plan view (13 floors/views in total). Next, I want to get the element.location of these walls per sublist in order to generate the detail line on its respective view. However, my sublists seem to be thrown out of the window in the ‘element.location’-node. I think this is the first problem. Then, the DetailLine.FromCurve-node does generate exactly 13 detail lines, exactly the amount of floor plan views I have… I’m not really sure what just happened! :slight_smile:

Can anyone help me with these final steps? How can I accomplish the generation of the detail lines on the correct floor plan view with a single run of this script?

Thanks again!

Did it create one per view or thirteen in one view?

Hi John,

it created one detail line per view. Any ideas? What I find strange is the fact that in the 3d preview there are a lot more lines visible!

Challenge accepted result in about 5 minutes


Below is the workflow. Ignore null results but it does what you need.

Hello Kulkul,

Unfortunately, it does not work (yet). I have done exactly what you suggest, however I get the following error popup message once I hit ‘run’:

"Unhandled Exception

Index was outside the bounds of the array.

at ProtoCore.DSASM.Executive.GetProcedureNode(Int32 blockId, Int32 classIndex, Int32 functionIndex)
at ProtoCore.DSASM.Executive.UpdateMethodDependencyGraph(Int32 entry, Int32 procIndex, Int32 classIndex)
at ProtoCore.DSASM.Executive.SetupExecutive(Int32 exeblock, Int32 entry)
at ProtoCore.DSASM.Executive.Execute(Int32 exeblock, Int32 entry, Language language)
at ProtoCore.DSASM.Executive.Execute(Int32 exeblock, Int32 entry, List1 breakpoints, Language language) at ProtoCore.DSASM.Executive.BounceUsingExecutive(Executive executive, Int32 exeblock, Int32 entry, StackFrame stackFrame, Int32 locals, Boolean fepRun, Executive exec, List1 breakpoints)
at ProtoScript.Runners.ProtoScriptRunner.ExecuteLive(Core core, RuntimeCore runtimeCore)
at ProtoScript.Runners.LiveRunner.Execute(Boolean isCodeCompiled)
at ProtoScript.Runners.LiveRunner.ApplyUpdate()
at ProtoScript.Runners.LiveRunner.CompileAndExecuteForDeltaExecution(List`1 astList)
at ProtoScript.Runners.LiveRunner.UpdateGraph(GraphSyncData syncData)
at Dynamo.Scheduler.UpdateGraphAsyncTask.HandleTaskExecutionCore()
at Dynamo.Scheduler.AsyncTask.Execute()"

I have no idea what this means…


Besides this error, you used the node Element.level. I think this is not how I want to do it. It should select all elements by view, not by level. This is because one element can be seen on multiple views, in that case I want this element to get a detail line on every view it is visible in.

Thank you for your help thus far!! :slight_smile:

Close. But we need to have a view for each curve that happens…

2016-03-10 07_57_33

detailLineMultiView <- Dynamo graph here

John solution at its best!

I thought he is looking for each level.

1 Like

John, you nailed it! Thank you and Kulkul for the help. This will cut down drawing time at my firm for these elements with 95%! :slight_smile: I really appreciate the knowledge and help received from this forum, great community! :slight_smile: Go Dynamo.

Glad to hear it! images

Hello John

I found a ‘bug’ in the script suggested above. In case there are floors without a wall in the view the List.Chop seems to entirely chop out this view from the list. At all times the (in my case) 13 views have to be retained in order to create the detail lines on its right view. Please see the image below. I have added multiple List.Count nodes which show the unwanted changes and speak for themselves I guess. At all times this List.Count should stay the same as the one at SetIntersection node, regardless of list item values of ‘zero’.

Do you have any suggestions to improve the script? Thank you again!

There seems to be a bug in the OOTB List.Chop node so that it creates “a chop” even if the input value is 0. You can try List.ChopByLengths in Clockwork package.



Brilliant, that worked like a charm! :slight_smile: Thank you.

This remains an ongoing topic :slight_smile: Unfortunately, one solution leads to another problem. Two, in fact.

  • Replacing List.Chop OOTB with List.ChopByLength by Clockwork: The latter does not seem to work properly with the node ‘GetAllViews’ by ArchiLab. Now it only returns one item in the chopped list, just one floorplanview instead of thirteen. Any ideas? (See screenshot)

  • As a solution to the problem above, I used List.ChopByLength node after the Element.Location (replacing OOTB List.Chop) but I kept List.Chop after the GetAllViews node (not in screenshot). At first it seemed to work, however I got some strange results in Revit itself. It seems as though for every view/floorplan it creates the lines of the first list item (so, the first list of the list) So, in my ground floor view the correct ground floor detail lines are created. Then, in my first floor view again the ground floor detail lines are filled in the spots where the first floor detail lines should have been. Same for the rest of the views. The list counts are correct, however. Maybe, somehow the latter problem goes away when the former is solved (maybe List.Chop and List.ChopByLength cannot coexist resulting in unstable results?)

Does anyone have any idea? Thank you for bearing with me :slight_smile:

Maybe you can do something like this?

You could also try using the “Equals” node:


Your suggestion is a nice and compact solution, thank you. However, from the node Element.location to List.Combine the first list item is dropped in the situation when its value is empty/zero. Is there a way to prevent it from doing this? At all times all views/floorplans have to be retained in this list.


With your suggestion I run into the same problem as Dimitar’s: Any list item at the start of the list with a value of zero/empty list will be dropped resulting in detail items being created in the wrong view (as the lists are no longer equal in length). Any suggestions?

Dimitar? Jostein? Or does anyone else have a suggestion? Would be fantastic to finish this one once and for all :slight_smile: So close!