I am getting the compile error at pcolor.RGB.
I want to add a color to the line feature.
How to modify the code?
Public Sub surya()Dim pmxdoc As IMxDocumentDim pstylegallery As IStyleGalleryDim pEnustylegalleryItem As IEnumStyleGalleryItemDim pstylegalleryItem As IStyleGalleryItemDim plinesymbol As ILineSymbolDim pcolor As IColorSymbolDim pmap As IMapDim player As ILayerDim pFealayer As IFeatureLayerDim pgeofealayer As IGeoFeatureLayerDim psimplerender As ISimpleRendererSet pmxdoc = Application.DocumentSet pstylegallery = pmxdoc.StyleGallerySet pEnustylegalleryItem = pstylegallery.Items("Line symbols", "ESRI.Style", "Dashed")Set pstylegalleryItem = pEnustylegalleryItem.NextSet plinesymbol = pstylegalleryItem.Itemplinesymbol.Width = 5#plinesymbol.Color = pcolor.ColorSet psimplerender = New SimpleRendererSet psimplerender.Symbol = plinesymbolSet pmap = pmxdoc.FocusMapSet player = pmap.Layer(0)Set pgeofealayer = playerSet pgeofealayer.Renderer = psimplerenderpmxdoc.UpdateContentspmxdoc.ActiveView.RefreshEnd Sub
أكثر...
I want to add a color to the line feature.
How to modify the code?
Public Sub surya()Dim pmxdoc As IMxDocumentDim pstylegallery As IStyleGalleryDim pEnustylegalleryItem As IEnumStyleGalleryItemDim pstylegalleryItem As IStyleGalleryItemDim plinesymbol As ILineSymbolDim pcolor As IColorSymbolDim pmap As IMapDim player As ILayerDim pFealayer As IFeatureLayerDim pgeofealayer As IGeoFeatureLayerDim psimplerender As ISimpleRendererSet pmxdoc = Application.DocumentSet pstylegallery = pmxdoc.StyleGallerySet pEnustylegalleryItem = pstylegallery.Items("Line symbols", "ESRI.Style", "Dashed")Set pstylegalleryItem = pEnustylegalleryItem.NextSet plinesymbol = pstylegalleryItem.Itemplinesymbol.Width = 5#plinesymbol.Color = pcolor.ColorSet psimplerender = New SimpleRendererSet psimplerender.Symbol = plinesymbolSet pmap = pmxdoc.FocusMapSet player = pmap.Layer(0)Set pgeofealayer = playerSet pgeofealayer.Renderer = psimplerenderpmxdoc.UpdateContentspmxdoc.ActiveView.RefreshEnd Sub
أكثر...