conn.Open(); string wkt = polyline.ToWkt(); // Using Teigha or RealDWG APIs SqlCommand cmd = new SqlCommand( "INSERT INTO Features (Geom) VALUES (geometry::STGeomFromText(@wkt, 0))", conn); cmd.Parameters.AddWithValue("@wkt", wkt); cmd.ExecuteNonQuery();
Install AutoCAD Map 3D or Civil 3D. Learn the MAPCONNECT command. Point it at your SQL Server. If you are a DBA: Create a geometry column in your asset table. Grant the AutoCAD users SELECT and UPDATE permissions on that column. sql server spatial autocad
For decades, a silent battle has raged in the AEC (Architecture, Engineering, and Construction) and GIS (Geographic Information Systems) industries: The CAD vs. GIS data disconnect. AutoCAD users deal in precise vectors, layers, and blocks. SQL Server users deal in tables, indexes, and queries. string wkt = polyline.ToWkt()