laptop and a wrench

Bug

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.

Last Published: August 31, 2014 ArcGIS Engine
Bug ID Number NIM069823
SubmittedJune 21, 2011
Last ModifiedJune 5, 2024
Applies toArcGIS Engine
Version found10.0
Program languageC#
Operating SystemWindows OS
Operating System VersionXP
StatusWill Not Be Addressed

Additional Information

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.

Workaround

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

Steps to Reproduce

Bug ID: NIM069823

Software:

  • ArcGIS Engine

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options