首页 > 其他 > 详细

arcengine之版本管理

时间:2014-02-26 01:55:34      阅读:481      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
 1 public void VersionManagement(IVersionedWorkspace versionedWorkspace)
 2 {
 3 //creating the new version off of the Default Version
 4 
 5 IVersion version = versionedWorkspace.DefaultVersion;
 6 version.CreateVersion("Work Order 95082");
 7 
 8     //setting the versions access
 9     version.Access = esriVersionAccess.esriVersionAccessPublic; 
10 
11     //setting the versiones description
12     version.Description = "Smiley Heights sewer project extension.";
13 
14     //checking the versions ancestry
15     if(version.HasParent())
16     {
17         IVersionInfo versionInfo = version.VersionInfo;
18         IVersion parentVersion = (IVersion)versionInfo.Parent;
19         MessageBox.Show(parentVersion.VersionName);
20     }
21 
22     //checking the locks on the version
23     IEnumLockInfo enumLockInfo = version.VersionLocks;
24     ILockInfo lockinfo = enumLockInfo.Next();
25 
26     while(lockinfo != null)
27     {
28         MessageBox.Show(" User: " + lockinfo.UserName + " has lock on version");
29         lockinfo = enumLockInfo.Next();
30     }
31 
32     //Renaming a version
33     version.VersionName = "North Redlands Tract";
34 
35     //deleting the version       
36     version.Delete();
37 }
bubuko.com,布布扣

arcengine之版本管理

原文:http://www.cnblogs.com/aegisada/p/3567041.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!