'Check to make sure we are editing
If Not m_pEditor.EditState = esriStateEditing Then
ICommand_Enabled = False
Exit Sub
End If
'Check for a single selected graphic element
Dim pGraphicSel As IGraphicsContainerSelect
Set pGraphicSel = m_pEditor.Map
If pGraphicSel.ElementSelectionCount <> 1 Then
ICommand_Enabled = False
Exit Sub
End If
'Make sure the graphic element is a piece of feature-linked annotation
Dim pElement As IElement
Set pElement = pGraphicSel.SelectedElement(0)
If Not TypeOf pElement Is IAnnotationElement Then
ICommand_Enabled = False
Exit Sub
End If
Dim g_pTextElement As ITextElement
Set g_pTextElement = pElement
ICommand_Enabled = True
Dim pClone As IClone, pSimpleSym As ISimpleTextSymbol
Dim g_pCloneSymbol As ITextSymbol
Dim g_pTextSymbol As ITextSymbol
Set g_pTextSymbol = g_pTextElement.Symbol
Set pSimpleSym = g_pTextSymbol
Set pClone = g_pTextSymbol
Set g_pCloneSymbol = pClone.Clone
Dim pAnnoElem As IAnnotationElement
Dim pAnnoFeat As IFeature
Dim pAnnoClass As IObjectClass
Set pAnnoElem = g_pTextElement
Set pAnnoFeat = pAnnoElem.Feature
Set pAnnoClass = pAnnoFeat.Class
Dim pFeatClassExt As AnnotationFeatureClassExtension,pAnnoClass2 As IAnnoClass
Set pFeatClassExt = pAnnoClass.Extension
Dim pAnnoProps As IAnnotateLayerTransformationProperties
Set pAnnoClass2 = pFeatClassExt
pAnnoClass2.AnnoProperties.QueryItem 0, pAnnoProps
g_pTextSize = (pAnnoProps.ScaleRatio / m_pEditor.Map.MapScale) * g_pCloneSymbol.Size
Dim pSimpSym As ISimpleTextSymbol
Set pSimpSym = g_pCloneSymbol
pSimpSym.Size = g_pTextSize ''出错处
提示错误信息:“无效的过程调用或参数-”