Hi everyone,**
I’m trying to create a Dynamo script to generate annotative spot elevation labels. I have two surfaces — EG and FG — and I want to subtract FG from EG to show the elevation difference. But I’m stuck; it doesn’t seem to work as expected. Has anyone run into this before or found a workaround? Any help would be greatly appreciated. Thanks in advance!
The X and Y expects a number, not a geometry object. And probably the Surface should be a Surface object, not the Surface name.
1 Like
Hi and welcome to the forum! I would suggest that you read the warnings as they are usually quite helpful and will explain what is going wrong.
For example, the Surface.ElevationAtXY node wants a Surface object as the first input, and as Anton pointed out, the Choose TIN Surface Name will only give you a String output.
What you need for that is the Selection.SurfaceByName node.
Object.Geometry will also only give a Function call without any input and requires some additional nodes do give X and Y coordinates for the Surface.ElevationAtXY node.
Here is an example where I’ve selected a Circle in Civil 3D Modelspace with the Select Object node and then taken the center of that circle with Circle.CenterPoint, after which I can use Point.X and Point.Y to get coordinates as inputs for Surface.ElevationAtXY.
This in turn will give you the elevation difference in the center point of that circle.
I hope this was helpful and gets you started on getting what you need from the script 