i used next code to load a symbol with specific style.. now i need to do the opposite operation.. i mean, i have one symbol and i want to know it's style.
is it possible?
private ISymbol LoadStyleSymbol()
{
try
{
IStyleGallery styleGallery = new ServerStyleGalleryClass();
IStyleGalleryStorage styleStorage = styleGallery as IStyleGalleryStorage;
styleStorage.TargetFile = @"C:\Program Files\ArcGIS\Engine10.0\Styles\3D Billboards.ServerStyle";
styleStorage.AddFile(@"C:\Program Files\ArcGIS\Engine10.0\Styles\3D Billboards.ServerStyle");
IEnumStyleGalleryItem enumStyleGalleryItem = styleGallery.Items["Marker Symbols", @"C:\Program Files\ArcGIS\Engine10.0\Styles\3D Billboards.ServerStyle", ""];
enumStyleGalleryItem.Reset();
IStyleGalleryItem styleItem = enumStyleGalleryItem.Next();
while (styleItem != null)
{
if (styleItem.Name == "Red Pushpin 4") break;
styleItem = enumStyleGalleryItem.Next();
}
ISymbol pSymbol = styleItem.Item as ISymbol;
return pSymbol;
}
catch (Exception ex)
{
MessageBox.Show("error 8, " + ex.Message);
return null;
}
}
