阅读:1336回复:1
请看看这样的程序问题
<P><BR>'Check to make sure we are editing<BR> If Not m_pEditor.EditState = esriStateEditing Then<BR> ICommand_Enabled = False<BR> Exit Sub<BR> End If<BR> <BR> 'Check for a single selected graphic element<BR> Dim pGraphicSel As IGraphicsContainerSelect<BR> Set pGraphicSel = m_pEditor.Map<BR> If pGraphicSel.ElementSelectionCount <> 1 Then<BR> ICommand_Enabled = False<BR> Exit Sub<BR> End If<BR> <BR> 'Make sure the graphic element is a piece of feature-linked annotation<BR> Dim pElement As IElement<BR> Set pElement = pGraphicSel.SelectedElement(0)<BR> If Not TypeOf pElement Is IAnnotationElement Then<BR> ICommand_Enabled = False<BR> Exit Sub<BR> End If<BR> <BR> Dim g_pTextElement As ITextElement<BR> Set g_pTextElement = pElement<BR> <BR> ICommand_Enabled = True</P>
<P><BR> Dim pClone As IClone, pSimpleSym As ISimpleTextSymbol<BR> Dim g_pCloneSymbol As ITextSymbol<BR> Dim g_pTextSymbol As ITextSymbol</P> <P> Set g_pTextSymbol = g_pTextElement.Symbol<BR> Set pSimpleSym = g_pTextSymbol<BR> Set pClone = g_pTextSymbol<BR> Set g_pCloneSymbol = pClone.Clone</P> <P> Dim pAnnoElem As IAnnotationElement<BR> Dim pAnnoFeat As IFeature<BR> Dim pAnnoClass As IObjectClass</P> <P> Set pAnnoElem = g_pTextElement<BR> Set pAnnoFeat = pAnnoElem.Feature<BR> Set pAnnoClass = pAnnoFeat.Class</P> <P> Dim pFeatClassExt As AnnotationFeatureClassExtension,pAnnoClass2 As IAnnoClass<BR> Set pFeatClassExt = pAnnoClass.Extension<BR> Dim pAnnoProps As IAnnotateLayerTransformationProperties<BR> Set pAnnoClass2 = pFeatClassExt<BR> pAnnoClass2.AnnoProperties.QueryItem 0, pAnnoProps<BR> <BR> g_pTextSize = (pAnnoProps.ScaleRatio / m_pEditor.Map.MapScale) * g_pCloneSymbol.Size</P> <P> Dim pSimpSym As ISimpleTextSymbol<BR> Set pSimpSym = g_pCloneSymbol<BR> <BR> pSimpSym.Size = g_pTextSize ''出错处</P> <P>提示错误信息:“无效的过程调用或参数-”</P> |
|
1楼#
发布于:2006-04-20 15:29
<P>难道没有人知道</P>
|
|