Sub ChangeWYSIWYGsymbol() Dim pUID As New UID pUID = "esriEditor.Editor" Dim pApplication As IApplication Set pApplication = Application Dim pEditor As IEditor Set pEditor = pApplication.FindExtensionByCLSID(pUID) Dim pEditSketch As IEditSketch3 Set pEditSketch = pEditor 'シンボルの作成 Dim yellow As IRgbColor Set yellow = New RgbColor yellow.RGB = vbYellow Dim red As IRgbColor Set red = New RgbColor red.RGB = vbRed pSimpleFillSymbol.Color = yellow Dim pSimpleLineSymboll As ISimpleLineSymbol Set pSimpleLineSymboll = New SimpleLineSymbol pSimpleLineSymboll.width = 2 pSimpleLineSymboll.Color = red Dim pSimpleFillSymbol As ISimpleFillSymbol Set pSimpleFillSymbol = New SimpleFillSymbol pSimpleFillSymbol.Outline = pSimpleLineSymboll 'pEditSketch.ClearWYSIWYGSketchSymbol 'クラシック エディタ相当となる Dim pEditProperties4 As IEditProperties4 Set pEditProperties4 = pEditSketch pEditProperties4.UseWYSIWYGSketchSymbol = True pEditSketch.SetWYSIWYGSketchSymbol pSymbol, True, True pEditSketch.RefreshSketch End Sub
WYSIWYG エディタのシンボル変更
2016/9/1 (木)