• Create Easy Surface Statistics Labels with Dynamo

    Jae Kwon
    Technical Specialist - INFRA/GIS at SolidCAD

    In this blog, our Civil/Infrastructure Technical Product Specialist, Jae Kwon, will cover how a Civil 3D user can use an automatic way to create surface statistics labels with Dynamo.

    Instead of Civil 3D users manually labelling surface statistics for his surfaces with a manual process, they can explore an automatic way using Dynamo. Let’s take it further below by comparing the existing manual method versus the Dynamo Solution.


    Existing Manual Method

    The existing method by the user was the following:

    1. Open the surface properties, navigate to the statistics tab, right click and “copy to clip” the contents

    2. Paste the info into notepad and rearrange the text to get the desired format

    3. Copy-paste the info into an Mleader pointing to the surface.

    This method works, but there is a lot of manual formatting involved every time, and this has to be repeated every time there is a surface update.

    Also, we cannot create a surface label style for this kind of label since there are no statistics properties we can pull from the surface labels (spot elevation, contour and slope).

    Now, let us look an automatic solution to this via Dynamo.


    Dynamo Solution

    First, we get the user to select the surface they want to label with a simple drop-down list. This may be done through either the Surfaces node from the Civil 3D Toolkit (shown below) or a UI package like Data Shapes.

    Next, we extract the statistics with the Surface TerrainStatistics node.

    The statistics can then be formatted with various text manipulation nodes. But where can we inject this text where one of the surface labels can access it? The answer is surface description! For most of us, the surface object’s description field goes largely unused, and it serves as the perfect place to store the statistics data.

    When a spot elevation label that shows the surface name and description is used, it looks something like this:

    Just a general note: The surface statistics can also be stored on the surface as a property set.

    If the surface undergoes any changes, we can update the statistics data stored in the descriptions (and the property set) by simply rerunning the same Dynamo script with a click of a button.



    Dynamo has become the primary tool for many power users to automate various tasks in Civil 3D because it is so easy to put together.

    We saw how surface statistic labelling may be done with Dynamo including:

    • Extracting and formatting surface statistics 
    • Storing the formatted data in the description and/or property set
    • Accessing this data with any one of the available surface label styles 
    • Easily updating the data by simply rerunning the Dynamo script

    If you need a solution to any Civil 3D project, we would be glad to help and find a specific Dynamo solution for you. Reach out to us at info@solidcad.ca