Failing to structure input to generate desired outcome


I’m going to try to describe my desired result and then my problem.

I’m trying to create a script that creates 3D-guardrails based on input from a excel sheet, the Civil3D objects that is used is an alignment and a surface. The script is supposed to be scalable meaning you can either input 1 or more rows where each row will create one guardrail.

So my scripts is basically designed like this:

  • Structure Excel Input lists.
  • Get Alignment name and Surface name
  • Place post blocks with a certain distance along the alignment with Z from surface
  • Create Guardrail based on block-section from a template
  • Put posts and guardrail in one block
  • Place rail beginning and ending blocks

I am however struggling to structure the input in order to get my desired outcome and I don’t exactly understand how I should organize the lists correctly to get it to work.
I do get a similar script to work with one input from excel, same dynamo operations, but the inputs are organized in a different way to work with one input only.

This is where it fails atm, it’s not creating all of the posts like I want it to. I have 4 different guardrail posts with a total of 52 posts, but it just creates four, one in the beginning of every guardrail even though my inputs all have 52 positions etc organized in the same way.

What is it that I am not getting here?

Thx for any sort of thought on this.

Hi @Sampa - have you already tried changing the levels for the ‘normal’ input to be @L2?

Hi, sorry for late answer!

I figured it out, I had to put Position, Normal and Rotation on same level, and Sourceblock and layer on same level aswell.