バージョンの変更

投稿日:2016/9/1 (木) 更新日:

'バージョン変更関数
Private Function GetNewFeatureClass(OldFeatureClass As IFeatureClass, VersionName As String) As IFeatureClass
 
    Dim pDataset As IDataset
    Set pDataset = OldFeatureClass
     
    Dim pWorkspace As IWorkspace
    Set pWorkspace = pDataset.Workspace
     
    Dim pVersionedWorkspace As IVersionedWorkspace
    Set pVersionedWorkspace = pWorkspace
     
    Dim pVersion As IVersion
    Set pVersion = pVersionedWorkspace
     
    Dim pNewVersion As IVersion
    Set pNewVersion = pVersionedWorkspace.FindVersion(VersionName)
     
     
    Dim pNewFeatureWorkspace As IFeatureWorkspace
    Set pNewFeatureWorkspace = pNewVersion
     
    Set GetNewFeatureClass = pNewFeatureWorkspace.OpenFeatureClass(pDataset.Name)
 
End Function

関連記事

-プログラミング, ArcGIS
-, ,

Copyright© WINGFIELD since1981 , 2018 All Rights Reserved.