应用此程序替换模型部分构件,为什么属性信息无法同步更新?

0 投票
public void RecordsetSample(Workspace workspace)
        {           
            DatasetVector dataset_world = workspace.Datasources[0].Datasets["圆柱"] as DatasetVector;
            DatasetVector dataset = workspace.Datasources[0].Datasets["柱"] as DatasetVector;           
            Recordset recordset = dataset.Query("SmID=1", CursorType.Dynamic);
            Recordset recordset_world = dataset_world.Query("SmID=1", CursorType.Dynamic);            
            recordset.MoveFirst();         
            Geometry geometry = recordset.GetGeometry();
            recordset_world.Edit();
            recordset_world.SetGeometry(geometry);
            recordset_world.Update();
            recordset_world.Refresh();           
            recordset.Close();
            geometry.Dispose();
            recordset.Dispose();
            recordset_world.Dispose();
        }
4月 14, 2018 分类:  171次浏览 | 用户: 1471817656 初出茅庐 (38 分)

1个回答

0 投票

您好,可以参考该问题回复http://qa.supermap.com/22020

4月 16, 2018 用户: 胡林 登峰造极 (5,972 分)
非常感谢!
...