在Visio使用UML对ESRI Geodatabase进行建模时,发现ESRI提供的UML语义检查器Semantics Checker总是报错:
This operation requires an ArcInfo or ArcEditor seat.
Use the ArcGIS Desktop Administration Utility to set your seat type.
可是我的License在ArcCatalog或ArcMap里LicenseType明明已经显示为ArcInfo啊,郁闷,在Google里找了找,发现ESRI中国给了下面的解释:
    
        
 虽然可以用了,心里还是不很舒服,因为总要在Visio和ArcCatalog之间切来切去的,实在不爽,因为这个语法检查助手事实上就是一段调用ESRI UML Semantics Checker类库里的一个静态方法,肯定是无法获取正确的License,看看了ArcGIS Develop Kit Help,看到有这么一个例子:
Private Function GetDeploymentName() As String
  Dim pLicense As IESRILicenseInfo
  Set pLicense = New ESRILicenseInfo
  Select Case pLicense.DefaultProduct
  Case esriProductCodeViewer
    GetDeploymentName = "ArcView"
  Case esriProductCodeEditor
    GetDeploymentName = "ArcEditor"
  Case esriProductCodeProfessional
    GetDeploymentName = "ArcInfo"
  End Select
End Function

Sub Semantics_Checker()
    If GetDeploymentName() = "ArcView" Then
        Dim pAo As IAoInitialize
        Set pAo = New AoInitialize
        pAo.Initialize esriLicenseProductCodeArcInfo
        pAo.Shutdown
    End If
    StartChecker
End Sub
本人QQ1283205,欢迎大家交流,一起提高。
This operation requires an ArcInfo or ArcEditor seat.
Use the ArcGIS Desktop Administration Utility to set your seat type.
可是我的License在ArcCatalog或ArcMap里LicenseType明明已经显示为ArcInfo啊,郁闷,在Google里找了找,发现ESRI中国给了下面的解释:
            
  | 
        ||||||||||||||||||||||||||||||||||||||||||||||||
先增加了一个ESRI System Object Library的引用,然后把这段代码放到里面一运行,提示"ArcView",难怪呢.好了,有这个信息就好办了,好了,说干就干,修改你现在Visio工程里的ESRI=>Semantics Checker宏代码如下:(最好把ESRI那个模版也修改一下,这样新的工程就都OK了)Private Function GetDeploymentName() As String
Dim pLicense As IESRILicenseInfo
Set pLicense = New ESRILicenseInfo
Select Case pLicense.DefaultProduct
Case esriProductCodeViewer
GetDeploymentName = "ArcView"
Case esriProductCodeEditor
GetDeploymentName = "ArcEditor"
Case esriProductCodeProfessional
GetDeploymentName = "ArcInfo"
End Select
MsgBox GetDeploymentNameEnd Function
Private Function GetDeploymentName() As String
  Dim pLicense As IESRILicenseInfo
  Set pLicense = New ESRILicenseInfo
  Select Case pLicense.DefaultProduct
  Case esriProductCodeViewer
    GetDeploymentName = "ArcView"
  Case esriProductCodeEditor
    GetDeploymentName = "ArcEditor"
  Case esriProductCodeProfessional
    GetDeploymentName = "ArcInfo"
  End Select
End Function
Sub Semantics_Checker()
    If GetDeploymentName() = "ArcView" Then
        Dim pAo As IAoInitialize
        Set pAo = New AoInitialize
        pAo.Initialize esriLicenseProductCodeArcInfo
        pAo.Shutdown
    End If
    StartChecker
End Sub本人QQ1283205,欢迎大家交流,一起提高。
                    
                
 为什么Visio中应用ArcGIS的语义检查器Semantics Checker始终报错?
                
            
        
浙公网安备 33010602011771号