'アノテーション フィーチャは属性値を変更する操作をArcObjectsで操作しても反映されない 'アノテーションに結びつくエレメントを操作する必要がある 'VBA Dim pAnnotaionFeature As IAnnotationFeature Set pAnnotaionFeature = pFeature 'フィーチャの取得 Dim pTextElement As ITextElement Set pTextElement = pAnnotaionFeature.Annotation Dim pGroupSymbolElement As IGroupSymbolElement Set pGroupSymbolElement = pTextElement pGroupSymbolElement.SymbolID = 0 'SymbolIDの変更 Dim pTextSymbol As ITextSymbol Set pTextSymbol = pTextElement.Symbol pTextSymbol.Angle = -90 'Angleの変更 '設定の反映 pTextElement.Symbol = pTextSymbol pAnnotaionFeature.Annotation = pTextElement 'フィーチャのストア pFeature.Store '--------------------------------------------------------- 'VB Dim pAnnotaionFeature As IAnnotationFeature = pFeature 'フィーチャの取得 Dim pTextElement As ITextElement = pAnnotaionFeature.Annotation Dim pGroupSymbolElement As IGroupSymbolElement = pTextElement pGroupSymbolElement.SymbolID = 0 'SymbolIDの変更 Dim pTextSymbol As ITextSymbol = pTextElement.Symbol pTextSymbol.Angle = -90 'Angleの変更 '設定の反映 pTextElement.Symbol = pTextSymbol pAnnotaionFeature.Annotation = pTextElement 'フィーチャのストア pFeature.Store() //--------------------------------------------------------- IAnnotationFeature pAnnotaionFeature = pFeature; //フィーチャの取得 ITextElement pTextElement = pAnnotaionFeature.Annotation; IGroupSymbolElement pGroupSymbolElement = pTextElement; pGroupSymbolElement.SymbolID = 0; //SymbolIDの変更 ITextSymbol pTextSymbol = pTextElement.Symbol; pTextSymbol.Angle = -90; //Angleの変更 //設定の反映 pTextElement.Symbol = pTextSymbol; pAnnotaionFeature.Annotation = pTextElement; pFeature.Store(); //フィーチャのストア
アノテーション フィーチャの更新
2016/9/1 (木)