The .NET API does not expose all the functionality of AutoCAD Civil 3D, and it exposes less than the COM API. The following areas are not yet exposed in .NET:
In addition, there are some areas in implemented functionality that are not yet complete:
If you require this functionality in your .NET project, you can use the corresponding COM objects.
To use AutoCAD Civil 3D COM APIs from .NET
Here is a C# example of getting a count of point groups and surfaces from a document using COM interop:
string m_sAcadProdID = "AutoCAD.Application";
string m_sAeccAppProgId = "AeccXUiLand.AeccApplication.10.0";
...
private void useCom()
{
//Construct AeccApplication object, Document and Database objects
m_oAcadApp = (IAcadApplication)System.Runtime.InteropServices.Marshal.GetActiveObject(m_sAcadProdID);
if (m_oAcadApp != null)
{
m_oAeccApp = (IAeccApplication)m_oAcadApp.GetInterfaceObject(m_sAeccAppProgId);
m_oAeccDoc = (IAeccDocument)m_oAeccApp.ActiveDocument;
// get the Database object via a late bind
m_oAeccDb = (Autodesk.AECC.Interop.Land.IAeccDatabase)m_oAeccDoc.GetType().GetProperty("Database").GetValue(m_oAeccDoc, null);
long lCount = m_oAeccDb.PointGroups.Count;
m_sMessage += "Number of PointGroups = " + lCount.ToString() + "\n";
lCount = m_oAeccDb.Surfaces.Count;
m_sMessage += "Number of Surfaces = " + lCount.ToString() + "\n\n";
MessageBox.Show(m_sMessage);
m_sMessage = "";
}
}
For more interoprability examples, see the CSharpClient and VbDotNetClient sample projects located in <Install directory>\Sample\AutoCAD Civil 3D\COM\.