C3D feature line label z vertices

I have a working dynamo script that labels the z value of a selected feature line in my drawing and that’s great! But I want to limit the labelling, instead on every single vertex I want to label one every ~25m I just cant figure how to chop up my original list.

Hi @alistair.stewart,

Can you zoom in a little and re-share the image? The node names are hidden.

Morning @mzjensen thanks for your reply! Attached is a more zoomed in image, also the python script that I copied from the video I watched to do the graph in the first place. (I am a complete noob with dynamo and Python…) the python script is to keep Z-values at 2 decimal points.

As a new user I cannot upload two items in one post.

Assuming you don’t care about the PIs and just want the featureline elevation labeled at 25m spacing you can just do this.
FeatureLineZAnno.dyn (30.1 KB)

@WrightEngineering thank you so much! Its great to see a different approach to the solution, yours seems more straight forward than my one, which is a copy from a YT video I watched.

In other software I have used this task is as easy as toggling a button to display any or all design strings z-values. I don’t quite understand why its such a chore in C3D…

Thanks for taking the time to help me out! :slight_smile:

1 Like

@WrightEngineering could you publish your custom node? the script errors at the Number.ToString node.


Thats a node from the springs package. Do you have it installed? I could write something in python. Just find that node to be clean and easy for rounding strings that contain numbers.

doesn’t like that node, it comes up with warning about out of date python (well above my head) it all works up to that node. the output from that node is null

Simple python replacement:

zValues = IN[0]
roundingValue = IN[1]

OUT = [str(round(zValue, roundingValue)) for zValue in zValues]

In all fairness: I think you can achieve your task with out-of-the-box tools.

If you want to label your line at an interval, use the “measure object”-option in the COGO-point-creation tool (sorry for the screenshot, my software is in german):

If you want to label your line at all vertices, use the “Polyline vertices automatic”-option:

Set all the default values in the “point creation”-tab to automatic so you don’t have to verify each vertex.

Dynamo is faster of course and you can do it for multiple lines at once.


@pumpaij, Danke.
that is an easier way!