Dhandapani.C

IPictureMarkerSymbol - Value does not fall within the expected range.

Discussion created by Dhandapani.C on Feb 8, 2012
Hi,
I am trying to create a marker symbol using the below code ...

     IPictureMarkerSymbol bmpMarkerSymbol = new PictureMarkerSymbol();
     bmpMarkerSymbol.createMarkerSymbolFromFile(esriIPictureType.esriIPictureBitmap, "c:\\temp\\mypict.bmp");

Since we suspected that image size exceeding 16x16 will result in an error "value does not fall within the expected range" we have shrinked the image to 10x10 and retested the above code.  Though the image size is much lesser than 16x16 I am getting the same kinnda error "VALUE DOES NOT FALL WITHIN THE EXPECTED RANGE".

I've tried using the below class code as well, but still bad luck !

    IPictureMarkerSymbol bmpMarkerSymbol = new PictureMarkerSymbolClass();
    bmpMarkerSymbol.createMarkerSymbolFromFile(esriIPictureType.esriIPictureBitmap, "c:\\temp\\mypict.bmp");

All the access rights for picking the images files were granted and no issue with access as well.

Still we are not able to figure out this strange error!  I guess I am missing some basic step here...

Does any one of you faced this kinnda issue...?

Thanks in advance
~Paul

Outcomes