您好,这是我的完整代码,能够完整运行
DatasetVector dataset = workspace1.Datasources[0].Datasets[6] as DatasetVector;
Recordset recordset = dataset.GetRecordset(false, CursorType.Dynamic);
Geometry geometry = recordset.GetGeometry();
if (geometry.Type == GeometryType.GeoModel3D)
{
GeoModel3D geoModel3D = geometry as GeoModel3D;
if (geoModel3D != null)
{
double x = 116.452099045492;
double y = 39.9139976379128;
double z = 20;
Point3D panPositon = new Point3D(x, y, z);
geoModel3D.Position = panPositon;
recordset.Edit();
recordset.SetGeometry(geoModel3D);
recordset.Update();
recordset.Refresh();
sceneControl1.Scene.Refresh();
}
}