用的时vs2015 变量环境也配置好了 32位的
完整代码如下 Application application = SuperMap.Desktop.Application.ActiveApplication;
Workspace workspace = application.Workspace;
WorkspaceConnectionInfo conInfo = new WorkspaceConnectionInfo(@"D:\SuperMap\iobjectsdotnet\supermap-iobjectsdotnet-9.1.2-17224-71949-all\SampleData\CBD\CBDCache.sxwu");
conInfo.Type = WorkspaceType.SXWU;
workspace.Open(conInfo);
//创建场景窗口
IFormScene formScene = application.CreateSceneWindow();
SceneControl sceneControl = formScene.SceneControl;
//获取三维地图场景
sceneControl.Scene.Workspace = workspace;
sceneControl.Scene.Open("CBD场景");
DatasourceConnectionInfo datasourceConInfo = new DatasourceConnectionInfo();
datasourceConInfo.Server = @"D:\LUOKONG\supermap-iobjectsdotnet-9.1.2-17224-71949-all\SampleData\Animation\Animation.udb";
datasourceConInfo.EngineType = EngineType.UDB;