Getting Catchment Flowline Coordinates for Label Creation

I’d like to create a dynamo script to add spot elevations labels at points along a catchment flow line. Specifically, the start and end points of each flow segment. However, since the flow segment of a catchment is some sort of…sub-object? within the catchment object I’m not sure how to go about getting this information.

I don’t mind watching tutorials or reading wiki pages if someone would be kind enough to point me in the right direction. Thanks!

Hi @rpriceAZEG6,

Check out the Camber package. There are lots of nodes for Catchment Groups, Catchments, and labels.

Once I have the coordinate info, this package will be invaluable!

I don’t see a function or process for getting the flowpath coordinates within the package, though.

Flow Paths and Flow Segments are not exposed very much in the API, so that’s why I haven’t made any nodes for them yet. Currently you can get the start and end points of the overall flow path using the Catchment.HydrologicallyMostDistantPoint and Catchment.DischargePoint nodes.

Thanks! This is good to know.

Camber is amazing!

While trying to solve this problem I did run into some limited behavior from Label.TextContents. I tried creating an invisible label text component with label information (for example, flow segment slope to 8 decimal places) so I could use Label.TextContents to query that information into Dynamo. However, Label.TextContents only seems to return visible text. Is this a limitation of Camber or a limitation of the API?

Great to hear that it’s helpful for you! :slight_smile:

It’s more a limitation of the API. There isn’t a method provided in the API to get the text contents of a label as displayed in model space. I had to do some gymastics with the Label.TextContents node to recursively explode the labels down to their primitive DBText components in order to read the text contents, and then combine the various components together into a single string. So if a component isn’t visible, then it isn’t considered part of the label. Some potential solutions to that would be to make the flow segment slope have a very small height so that it’s practically invisible, or perhaps put it on a no-plot layer.

2 Likes