AnsweredAssumed Answered

Polygon line thickness issue when handling symbology with Java Arcobjects

Question asked by peterlen on Aug 5, 2014
Latest reply on Aug 6, 2014 by peterlen

We are using ArcGIS 10.0 and I am building a Java custom tool (for a toolbox) using the java ArcObjects API.  In my tool, I am taking in the location of an MXD file and the location of a file GDB.  I am taking the features from the file GDB and creating a layer within the MXD.  No problem with any of that.  What I also am doing is updating the layer's symbology to give a specific fill color to the features (polygons) when added to the MXD map document.  No problem with that either.  The problem that I am running into deals with the polyon line thickness.  I give a black border line color but I would like the thickness of the line to be some value bigger than 1.  This is the code that I am using in relation to the feature layer's symbology:



SimpleRenderer sr = (SimpleRenderer) featurelayer.getRenderer();

ISymbol sym = sr.getSymbol();

SimpleFillSymbol sfs = (SimpleFillsymbol) sym;


ILineSymbol ls = new SimpleLineSymbol();






Here is the oddity.  When the MXD file is just an empty MXD, the features added to the map document have a blcak line with a width of 5, which is just what I wanted. If, however, the MXD is a template (which contains things like a North arrow, legend, scale, etc), the line thickness for the features stays at 1, although  the outline in the legend of the template is 5 and the outline in the ArcMap's TOC for that layer is also 5.  I am not sure why feature polygon outline is not changed.  Any clues as to why this is happening?  Is there some template property I need to set?


Thanks for any thoughts - Peter