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中国给了下面的解释:
|
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 GetDeploymentName
End Function
先增加了一个ESRI System Object Library的引用,然后把这段代码放到里面一运行,提示"ArcView",难怪呢.好了,有这个信息就好办了,好了,说干就干,修改你现在Visio工程里的ESRI=>Semantics Checker宏代码如下:(最好把ESRI那个模版也修改一下,这样新的工程就都OK了)
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 GetDeploymentName
End 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
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,欢迎大家交流,一起提高。