Import Kml To Autocad Civil 3d 2018 -

// Transform & import ImportGeometry(kmlData, targetCsCode, db, tr);

public ObjectId Create3DPolyline(Point3dCollection points, Database db, Transaction tr)

public List<KmlGeometry> ParseKML(string filepath)

var pl = new Polyline3d(Poly3dType.SimplePoly, points, false); var bt = tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite) as BlockTableRecord; var plId = bt.AppendEntity(pl); tr.AddNewlyCreatedDBObject(pl, true); return plId;

return geometries; Use CoordinateSystemService from Civil 3D API:

tr.Commit();

// Transform & import ImportGeometry(kmlData, targetCsCode, db, tr);

public ObjectId Create3DPolyline(Point3dCollection points, Database db, Transaction tr)

public List<KmlGeometry> ParseKML(string filepath)

var pl = new Polyline3d(Poly3dType.SimplePoly, points, false); var bt = tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite) as BlockTableRecord; var plId = bt.AppendEntity(pl); tr.AddNewlyCreatedDBObject(pl, true); return plId;

return geometries; Use CoordinateSystemService from Civil 3D API:

tr.Commit();