WYSIWYG エディタのシンボル変更

投稿日:2016/9/1 (木) 更新日:

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

関連記事

-プログラミング, ArcGIS
-, ,

Copyright© WINGFIELD since1981 , 2018 All Rights Reserved.