Objects along only some parts of the path

I’ve modeled tunnel in Civil 3D (picture of the cross section of the tunnel is below).

These rock bolts are predicted only on some parts of the path.
I’ve done Dynamo code.
The problem is that code works only for the whole path.
Do you have any idea how to change my code in order to get rock bolts only on some parts of the path?