laptop and a wrench

Error

The IGraphicProperties.LineSymbol Property code snippet has two mistakes, and may need to address that the IGraphicProperties pointer variable should be declared as class-level.

Última publicación: August 31, 2014 ArcGIS Engine
Número de ID del error NIM069823
EnviadoJune 21, 2011
Última modificaciónJune 5, 2024
Relacionado conArcGIS Engine
Versión encontrada10.0
Lenguaje del programaC#
Sistema operativoWindows OS
Versión de sistema operativoXP
EstadoWill Not Be Addressed

Información adicional

We apologize that we were unable to address this issue within the current product support cycle. If the issue continues to affect your work in a supported release, please contact Technical Support.

Solución alternativa

private void MainForm_Load(object sender, EventArgs e){ ... ... ... m_graphicProperties = new CommandsEnvironmentClass(); //EDGAR: but do instantiate in the Load method //Get the IRgbColor interface IRgbColor color = new RgbColorClass(); //Set the color to be red ((Red) + (Green * 256) + (Blue * 256 * 256)) color.RGB = 255; //ILineSymbol pLineSymbol = new SimpleLineSymbolClass(); //either create a new SimpleLineSymbol object, like this ILineSymbol pLineSymbol = m_graphicProperties.LineSymbol; //or just get reference to existing one, like this pLineSymbol.Color = color; //change or assign the color pLineSymbol.Width = 10; //change or assign the width m_graphicProperties.LineSymbol = pLineSymbol; System.Diagnostics.Debug.WriteLine(m_graphicProperties.LineSymbol.Color.RGB.ToString()); //confirm the change System.Diagnostics.Debug.WriteLine(m_graphicProperties.LineSymbol.Width.ToString()); //confirm the change ... ... ...}//end of MainForm_Load

Pasos para reproducir

ID del error: NIM069823

Software:

  • ArcGIS Engine

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga