# TIN Surface to Surface

**URL:** <https://forum.dynamobim.com/t/tin-surface-to-surface/49996>\
**Category:** Civil 3D\
**Tags:** zerotouch\
**Created:** [April 29, 2020, 8:17pm UTC](https://forum.dynamobim.com/t/tin-surface-to-surface/49996 "2020-04-29T20:17:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![TonyDaSilva](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@TonyDaSilva](https://forum.dynamobim.com/u/TonyDaSilva)\
**Post date:** [April 29, 2020, 8:17pm UTC](https://forum.dynamobim.com/t/tin-surface-to-surface/49996/1 "2020-04-29T20:17:13Z")

</div>

Hi,

I am an experienced programmer who is learning how to write custom C# nodes for Dynamo for Civil 3D.

I am trying to use a surface as a parameter but I am getting the following error.

> Autodesk.DesignScript.Geometry.Surface but was called with Autodesk.Civil.DynamoNodes.TinSurface

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/0/109523d68481638f4c15e8656adcce7fc051194f.png)

I was wondering where do I reference the Autodesk.Civil.DynamoNodes.TinSurface type or if it is possible to cast TinSurface to Surface or if there is an assembly or NuGet package I need?

Thanks,

---

<div class="post-metadata">

**Author:** ![Joelmick](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joelmick/32/93148_2.png) [@Joelmick](https://forum.dynamobim.com/u/Joelmick)\
**Post date:** [April 30, 2020, 6:10am UTC](https://forum.dynamobim.com/t/tin-surface-to-surface/49996/2 "2020-04-30T06:10:24Z")

</div>

Hi Tony,

_I was wondering where do I reference the Autodesk.Civil.DynamoNodes.TinSurface type?_  
You refer to it in the zero touch node. Make sure it takes in an Autodesk.Civil.DynamoNodes.TinSurface instead of the Autodesk.Designscript.Geometry.Surface.

OR

_if it is possible to cast TinSurface to (Dynamo)Surface or if there is an assembly or NuGet package I need?_  
Not directly because they are different. What you can do is create a Dynamo Polysurface from a TINsurface. A Tinsurface is more like an PolySurface than a Surface.

Depending on what you want the node to do, decide if you take in a TINSurface, Civil Surface or a Dynamo Surface and refer the right type in the sero touch node

Constructing Dynamo Polysurface from a Civil TINSurface

 ![Untitled](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/9/e980e998aaf34dba5aedf5e4fd72fe2713e3bf03.png)

---

<div class="post-metadata">

**Author:** ![Paolo\_Emilio\_Serra1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paolo_emilio_serra1/32/12902_2.png) [@Paolo\_Emilio\_Serra1](https://forum.dynamobim.com/u/Paolo_Emilio_Serra1)\
**Post date:** [April 30, 2020, 7:10am UTC](https://forum.dynamobim.com/t/tin-surface-to-surface/49996/3 "2020-04-30T07:10:22Z")

</div>

The Dynamo objects are wrappers around the API objects, you can access to the them calling the property “InternalDBObject” for example.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/3/e336da0abbed800830b26cd6df555c6dc447314f.png)

---

<div class="post-metadata">

**Author:** ![TonyDaSilva](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@TonyDaSilva](https://forum.dynamobim.com/u/TonyDaSilva)\
**Post date:** [April 30, 2020, 3:00pm UTC](https://forum.dynamobim.com/t/tin-surface-to-surface/49996/4 "2020-04-30T15:00:54Z")

</div>

Where is the assembly for Autodesk.Civil.DynamoNodes.TinSurface as it doesn’t seem to be built in to the ones I have already referenced?

Also, is there a good place that documents all Autodesk API’s ?

---

<div class="post-metadata">

**Author:** ![TonyDaSilva](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@TonyDaSilva](https://forum.dynamobim.com/u/TonyDaSilva)\
**Post date:** [April 30, 2020, 3:11pm UTC](https://forum.dynamobim.com/t/tin-surface-to-surface/49996/5 "2020-04-30T15:11:52Z")

</div>

> [@TonyDaSilva](#):
>
> Autodesk.Civil.DynamoNodes

Actually, nevermind… I found the DLL files.

Thanks.

---

<div class="post-metadata">

**Author:** ![Joelmick](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joelmick/32/93148_2.png) [@Joelmick](https://forum.dynamobim.com/u/Joelmick)\
**Post date:** [April 30, 2020, 3:17pm UTC](https://forum.dynamobim.com/t/tin-surface-to-surface/49996/6 "2020-04-30T15:17:39Z")

</div>

Yep, the AutocadNodes.dll and the Civil3DNodes.dll containt the Nodes and wrappers you see in Dynamo.  
As Paolo also pointed out, the Dynamo TinSurface object is a Wrapper around the Civil3D API TinSurface.  
You can Convert a Dynamo TINSurface to a Civil TINSurface api Object by using the InternalDBObject property of the Dynamo TINSurface.

Sadly there is not 1 location where all the API Documentation is stored. I use the following linkes for the API’s

Autocad API  
[https://help.autodesk.com/view/OARX/2020/ENU/?guid=OARX-ManagedRefGuide-Autodesk\_AutoCAD\_DatabaseServices\_LayerTableRecord](https://help.autodesk.com/view/OARX/2020/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_DatabaseServices_LayerTableRecord)

Civil 3D API  
[http://docs.autodesk.com/CIV3D/2019/ENU/API\_Reference\_Guide/index.html](http://docs.autodesk.com/CIV3D/2019/ENU/API_Reference_Guide/index.html)

Revit API  
[https://www.revitapidocs.com/](https://www.revitapidocs.com/)
