我尝试使用SDK修改特定样式的符号属性,但是我只能一次更新一个样式符号。有没有办法在全部修改完成后一次性更新样式里的所有符号?
I tried using the SDK to modify the symbol properties of a particular style, but I can only update style symbols one at a time.
PolygonSymbol = style.SearchSymbols(StyleItemType.PolygonSymbol, "");
foreach (SymbolStyleItem pSymbol in PolygonSymbol)
{
var attValue1 = pSymbol.GetType().GetProperty(att1).GetValue(pSymbol, null);
var attValue2 = pSymbol.GetType().GetProperty(att2).GetValue(pSymbol, null);
pSymbol.GetType().GetProperty(att1).SetValue(pSymbol, attValue2);
pSymbol.GetType().GetProperty(att2).SetValue(pSymbol, attValue1);
style.UpdateItem(pSymbol);
}
Is there a way to update all the symbols in a style once ?
There is no "global" change/update on a style
This can be frustrating. It will take a lot of time if there are a lot of symbols to update.
Thank you